util: put limits on how many strings we join

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-11 13:43:20 +10:00
parent 6ad928a1b6
commit 24a19dd167

View file

@ -595,6 +595,8 @@ strv_join(char **strv, const char *joiner)
assert(slen < 1000);
assert(strlen(joiner) < 1000);
assert(count > 0);
assert(count < 100);
slen += (count - 1) * strlen(joiner);