]> git.sur5r.net Git - i3/i3/commit
scalloc parse_config input to make sure it terminates with '\0'
authorOrestis Floros <orestisf1993@gmail.com>
Tue, 12 Sep 2017 09:29:01 +0000 (12:29 +0300)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 13 Sep 2017 16:46:04 +0000 (18:46 +0200)
commitd35de66f1e35f6c6ad6df5ad33c44541e19a5cdf
tree2306cffa635efec4f2d638bfc37c519d03ad9000
parent919ac9c7ef4be41bd3c2ef923cd38ba523d1f8c3
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]