]> git.sur5r.net Git - i3/i3/commit
scalloc parse_config input to make sure it terminates with '\0' 2935/head
authorOrestis Floros <orestisf1993@gmail.com>
Tue, 12 Sep 2017 09:29:01 +0000 (12:29 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Wed, 13 Sep 2017 12:31:53 +0000 (15:31 +0300)
commit7b0f4abf4faa15ba6cc71a59cf9f57ef682fe596
treec45b3df942da33ab50a2f3671eb1ab4acfbef058
parentfd7319683d8c4a5efbfd3431c1ab22ecac8bf59d
scalloc parse_config input to make sure it terminates with '\0'

Otherwise strchr() can crash for files that don't end with '\n' because
it won't find a null char to terminate at.

Fixes #2934
src/config_parser.c
testcases/t/270-config-no-newline-end.t [new file with mode: 0644]