Skip to content
Snippets Groups Projects
Commit 9e40bc4c authored by Matt Mackall's avatar Matt Mackall
Browse files

diffhelpers: harden testhunk

parent fcb97d9a
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@
return NULL;
alen = PyList_Size(a);
blen = PyList_Size(b);
if (alen > blen - bstart) {
if (alen > blen - bstart || bstart < 0) {
return Py_BuildValue("l", -1);
}
for (i = 0; i < alen; i++) {
......
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