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=1592374Signed-off-by: NJerry James <loganjerry@gmail.com> [alexpl@fedoraproject.org: reformatted patch for submission] Signed-off-by: NAlexander Ploumistos <alexpl@fedoraproject.org> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
Showing
想要评论请 注册 或 登录