There is a an off-by-one error in the size of some of the buffers used
to hold key-names. The maximum length of a name is `ULOGD_MAX_KEYLEN`,
and so declare the buffers with size `ULOGD_MAX_KEYLEN + 1`.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
struct field {
TAILQ_ENTRY(field) link;
- char name[ULOGD_MAX_KEYLEN];
+ char name[ULOGD_MAX_KEYLEN + 1];
struct ulogd_key *key;
};
{
struct sqlite3_priv *priv = (void *)pi->private;
struct field *f;
- char buf[ULOGD_MAX_KEYLEN];
+ char buf[ULOGD_MAX_KEYLEN + 1];
char *underscore;
char *stmt_pos;
int i, cols = 0;
sqlite3_init_db(struct ulogd_pluginstance *pi)
{
struct sqlite3_priv *priv = (void *)pi->private;
- char buf[ULOGD_MAX_KEYLEN];
+ char buf[ULOGD_MAX_KEYLEN + 1];
char *underscore;
struct field *f;
sqlite3_stmt *schema_stmt;