Skip to content
Snippets Groups Projects
Commit fcb97d9a26cd authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

patch: fix segfault against unified diffs which start line is zero

Since 2b1ec74c961f, if a chunk starts with "@@ -0,1", oldstart turns into
a negative value. Because diffhelpers.testhunk() doesn't expect negative bstart,
it bypasses "alen > blen - bstart" condition and segfaults at
"PyList_GET_ITEM(b, i + bstart)".
parent 822e75386c16
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment