From: Evgeny Vereshchagin Date: Thu, 29 Nov 2018 02:05:20 +0000 (+0100) Subject: catalog: reject entries where the language is too short early X-Git-Tag: v240~182 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c90c39ff7bf2112616813f609bee4443ae8a715c;p=thirdparty%2Fsystemd.git catalog: reject entries where the language is too short early Closes https://oss-fuzz.com/testcase-detail/5674475278827520 --- diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 63d27337b53..0f18d31addf 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -217,7 +217,7 @@ static int catalog_entry_lang(const char* filename, int line, size_t c; c = strlen(t); - if (c == 0) + if (c < 2) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "[%s:%u] Language too short.", filename, line); diff --git a/test/fuzz/fuzz-catalog/clusterfuzz-testcase-minimized-fuzz-catalog-5674475278827520 b/test/fuzz/fuzz-catalog/clusterfuzz-testcase-minimized-fuzz-catalog-5674475278827520 new file mode 100644 index 00000000000..2594f49df02 --- /dev/null +++ b/test/fuzz/fuzz-catalog/clusterfuzz-testcase-minimized-fuzz-catalog-5674475278827520 @@ -0,0 +1,2 @@ +-- ae2f7b866b0347b9af31fe1c80b127c0 ΓΏ + \ No newline at end of file