]> git.ipfire.org Git - thirdparty/git.git/commit - pkt-line.c
pkt-line: fix packet_read_line() to handle len < 0 errors
authorBen Peart <peartben@gmail.com>
Fri, 5 May 2017 15:27:54 +0000 (11:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 01:57:26 +0000 (10:57 +0900)
commit974b50c5565107e1e3209176682ee6f6e420bd2b
tree39fb555270c308253f9b5ebc61abda4f13f2ac33
parent070e5f72d9d6f0056895bd3222e75f8075ed4c0e
pkt-line: fix packet_read_line() to handle len < 0 errors

Update packet_read_line() to test for len > 0 to avoid potential bug
if read functions return lengths less than zero to indicate errors.

Signed-off-by: Ben Peart <benpeart@microsoft.com>
Found/Fixed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pkt-line.c