summaryrefslogtreecommitdiff
path: root/include/git2/annotated_commit.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-06-29 09:11:02 +0200
committerPatrick Steinhardt <ps@pks.im>2018-06-29 09:30:02 +0200
commit24597812220325f1cb38f61e56b095ff38d1b1cb (patch)
treef1cbcd896bc749ad87c36089b840eb6d85eaacd6 /include/git2/annotated_commit.h
parent7db258706ab4e09046255cdcbf27c5af8d29a551 (diff)
downloadlibgit2-24597812220325f1cb38f61e56b095ff38d1b1cb.tar.gz
delta: fix out-of-bounds read of delta
When computing the offset and length of the delta base, we repeatedly increment the `delta` pointer without checking whether we have advanced past its end already, which can thus result in an out-of-bounds read. Fix this by repeatedly checking whether we have reached the end. Add a test which would cause Valgrind to produce an error. Reported-by: Riccardo Schirone <rschiron@redhat.com> Test-provided-by: Riccardo Schirone <rschiron@redhat.com>
Diffstat (limited to 'include/git2/annotated_commit.h')
0 files changed, 0 insertions, 0 deletions