summaryrefslogtreecommitdiff
path: root/progress.h
diff options
context:
space:
mode:
authorLibravatar Vasil Dimov <vd@FreeBSD.org>2020-04-15 20:32:25 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-15 18:32:48 -0700
commit8d1675eb7f7f76af834c72e72c8824410e874fec (patch)
tree25a2bf401bf645c83fd775c08c67433d0033bb7a /progress.h
parentrange-diff: fix a crash in parsing git-log output (diff)
downloadtgif-8d1675eb7f7f76af834c72e72c8824410e874fec.tar.xz
range-diff: avoid negative string precision
If the supplied integer for "precision" is negative in `"%.*s", len, line` then it is ignored. So the current code is equivalent to just `"%s", line` because it is executed only if `len` is negative. Fix this by saving the value of `len` before overwriting it with the return value of `parse_git_diff_header()`. Signed-off-by: Vasil Dimov <vd@FreeBSD.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'progress.h')
0 files changed, 0 insertions, 0 deletions