]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
t: handle EOF in test_copy_bytes()
authorJeff King <peff@peff.net>
Sun, 16 Jul 2017 10:45:32 +0000 (06:45 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jul 2017 21:55:43 +0000 (14:55 -0700)
commitf7f6dc340ed4eb2bddc41993e112f8f18fcc1598
tree4c44441f54672b63d29b137eeff9c69edc57442d
parent08f9c32463bf9e578acb7ac5f77afd36e803c6bc
t: handle EOF in test_copy_bytes()

The test_copy_bytes() function claims to read up to N bytes,
or until it gets EOF. But we never handle EOF in our loop,
and a short input will cause perl to go into an infinite
loop of read() getting zero bytes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh