diff options
author | Jann Horn <jannh@google.com> | 2018-08-30 03:10:26 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-30 10:30:22 -0700 |
commit | fa72f90e7a5cfbbc32860c6336628c96791b5af3 (patch) | |
tree | 661cb3ad4dbfed7cc0a23c9199650593d3c5a22f /Documentation/RelNotes/1.7.7.5.txt | |
parent | patch-delta: fix oob read (diff) | |
download | tgif-fa72f90e7a5cfbbc32860c6336628c96791b5af3.tar.xz |
patch-delta: consistently report corruption
When applying a delta, if we see an opcode that cannot be
fulfilled (e.g., asking to write more bytes than the
destination has left), we break out of our parsing loop but
don't signal an explicit error. We rely on the sanity check
after the loop to see if we have leftover delta bytes or
didn't fill our result buffer.
This can silently ignore corruption when the delta buffer
ends with a bogus command and the destination buffer is
already full. Instead, let's jump into the error handler
directly when we see this case.
Note that the tests also cover the "bad opcode" case, which
already handles this correctly.
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/1.7.7.5.txt')
0 files changed, 0 insertions, 0 deletions