} while (0)
#define SSTRCAT(d,s) do { \
- strncat ((d), (s), sizeof (d)); \
+ size_t _l = strlen (d); \
+ strncpy ((d) + _l, (s), sizeof (d) - _l); \
(d)[sizeof (d) - 1] = 0; \
} while (0)
key = res.lines[i];
value = strchr (key, '=');
if (value == NULL)
- BAIL_OUT (EPROTO);
+ BAIL_OUT (EILSEQ);
*value = 0;
value++;
int lcc_flush (lcc_connection_t *c, const char *plugin, /* {{{ */
lcc_identifier_t *ident, int timeout)
{
- char command[1024];
+ char command[1024] = "";
lcc_response_t res;
int status;
if (*ident_str == 0)
{
- lcc_set_errno (c, EPROTO);
+ lcc_set_errno (c, EILSEQ);
status = -1;
break;
}