diff options
author | René Scharfe <l.s.r@web.de> | 2017-08-10 22:56:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-10 14:41:51 -0700 |
commit | 642956cf455ff8635be32b3160b12369da73cfe2 (patch) | |
tree | 28219e7da107a88581507855d39c78548dd2208b /t/t4046-diff-unmerged.sh | |
parent | Git 2.12.4 (diff) | |
download | tgif-642956cf455ff8635be32b3160b12369da73cfe2.tar.xz |
strbuf: clear errno before calling getdelim(3)
getdelim(3) returns -1 at the end of the file and if it encounters an
error, but sets errno only in the latter case. Set errno to zero before
calling it to avoid misdiagnosing an out-of-memory condition due to a
left-over value from some other function call.
Reported-by: Yaroslav Halchenko <yoh@onerussian.com>
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4046-diff-unmerged.sh')
0 files changed, 0 insertions, 0 deletions