mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
journal: don't allow adding invalid matches to the context
This commit is contained in:
parent
e51240886f
commit
d94117a93c
@ -115,7 +115,11 @@ _public_ int sd_journal_add_match(sd_journal *j, const void *data, size_t size)
|
||||
return -EINVAL;
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
if (size <= 0)
|
||||
if (size <= 1)
|
||||
return -EINVAL;
|
||||
if (!memchr(data, '=', size))
|
||||
return -EINVAL;
|
||||
if (*(char*) data == '=')
|
||||
return -EINVAL;
|
||||
|
||||
/* FIXME: iterating with multiple matches is currently
|
||||
|
Loading…
Reference in New Issue
Block a user