summaryrefslogtreecommitdiff
path: root/notes-cache.c
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 /notes-cache.c
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 'notes-cache.c')
0 files changed, 0 insertions, 0 deletions