branch | stable |
changeset 17353 | bde1185f406c |
parent 17165 | 249cc4ec4327 |
child 17356 | 511dfb34b412 |
--- a/mercurial/parsers.c Sat Aug 11 12:45:37 2012 -0500 +++ b/mercurial/parsers.c Thu Aug 02 19:10:45 2012 +0400 @@ -1084,8 +1084,10 @@ return NULL; } - if (nodelen > 40) - nodelen = 40; + if (nodelen > 40) { + PyErr_SetString(PyExc_ValueError, "key too long"); + return NULL; + } for (i = 0; i < nodelen; i++) hexdigit(node, i);