]> git.sur5r.net Git - i3/i3/commit
fake_outputs: Don't read past the end of string
authorVladimir Panteleev <git@thecybershadow.net>
Tue, 19 Sep 2017 14:37:35 +0000 (14:37 +0000)
committerVladimir Panteleev <git@thecybershadow.net>
Tue, 19 Sep 2017 14:57:08 +0000 (14:57 +0000)
commit19b00346e5e805cb88ec24c1d29bbd1d292eec14
tree2c6350f8c2db6a3c8e784f9a7955750b57f5b18b
parent755b22327807593fd184c4dae46b197848a74452
fake_outputs: Don't read past the end of string

fake_outputs_init would unconditionally increase the string read
pointer variable (walk) by one character more than the number of
characters that have been read, to skip past the character delimiting
records (a comma). However, when the input string was not terminated
by a comma, it would cause the function to read past the null
terminator instead.

Avoid this by explicitly checking for the expected delimiter.
src/fake_outputs.c