catalog: reject entries where the language is too short early

Closes https://oss-fuzz.com/testcase-detail/5674475278827520
This commit is contained in:
Evgeny Vereshchagin 2018-11-29 03:05:20 +01:00 committed by Yu Watanabe
parent bf61b05a06
commit c90c39ff7b
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -0,0 +1,2 @@
-- ae2f7b866b0347b9af31fe1c80b127c0 ÿ