Skip to content

Commit

Permalink
util: put limits on how many strings we join
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Jun 11, 2018
1 parent 6ad928a commit 24a19dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libinput-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 24a19dd

Please sign in to comment.