summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)