Jerry James 73d1c580f9 kconfig: loop boundary condition fix
If buf[-1] just happens to hold the byte 0x0A, then nread can wrap around
to (size_t)-1, leading to invalid memory accesses.

This has caused segmentation faults when trying to build the latest
kernel snapshots for i686 in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1592374

Signed-off-by: Jerry James <loganjerry@gmail.com>
[alexpl@fedoraproject.org: reformatted patch for submission]
Signed-off-by: Alexander Ploumistos <alexpl@fedoraproject.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-28 22:48:08 +09:00
..
2018-05-28 18:25:21 +09:00
2018-05-28 18:25:21 +09:00
2018-05-28 18:25:21 +09:00
2005-04-16 15:20:36 -07:00
2018-05-28 18:25:21 +09:00
2018-05-28 18:25:21 +09:00
2018-02-10 11:26:04 +09:00
2018-05-28 18:25:21 +09:00
2018-05-28 18:25:21 +09:00
2015-10-14 14:59:03 +02:00