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.
num_screens++;
}
- walk += chars_consumed + 1;
+ walk += chars_consumed;
+ if (*walk == ',')
+ walk++;
}
if (num_screens == 0) {