summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-18 22:30:27 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-18 22:34:42 +0200
commitd5c4ed623b3b83b8caaf6b26f5b4c8006ff372ac (patch)
treef08013c25425e0eacb051ccd58b7cc86dcbc834a /src/journal/sd-journal.c
parent23635a8547eac0c05922609f5930badc86faf080 (diff)
journal: validate field name in sd_journal_query_unique()
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c2
1 files changed, 2 insertions, 0 deletions
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)