Max Kunzelmann
aa5ff07b61
Fix out of bounds memory access (off by one)
...
If fgets reads a line that only contains a `\n`, then the pointer `eol`
will point to the first byte in that buffer. The subsequent dereference
of `*(eol -1 )` will access the byte before that buffer.
This fix makes sure that that length of the current line read by fgets
is at least 2 bytes long.
Signed-off-by: Max Kunzelmann <max@mxzero.net >
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org >
2023-12-14 13:17:24 +01:00
..
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-11-06 15:42:59 -05:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-12-14 13:17:24 +01:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2018-10-21 20:02:57 +02:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-11-06 15:42:59 -05:00
2023-04-11 17:04:24 -04:00
2023-04-15 09:47:30 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-11-06 15:42:59 -05:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00
2023-04-11 17:04:24 -04:00