From d5c4ed623b3b83b8caaf6b26f5b4c8006ff372ac Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Oct 2012 22:30:27 +0200 Subject: journal: validate field name in sd_journal_query_unique() --- src/journal/sd-journal.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index a874ca5eaa..772a4fb6dc 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -2214,6 +2214,8 @@ _public_ int sd_journal_query_unique(sd_journal *j, const char *field) { return -EINVAL; if (isempty(field)) return -EINVAL; + if (!field_is_valid(field)) + return -EINVAL; f = strdup(field); if (!f) -- cgit v1.2.3-54-g00ecf