# HG changeset patch # User Bryan O'Sullivan # Date 1344883795 25200 # Node ID c87ba0a6fb794b70416718486987b62ea0c176a6 # Parent c6f88e7f95b764e23b7e0b4353c5a6458bbc3cc4# Parent bde1185f406cd2367e3973d827a6d613fd68ec60 Merge with crew-stable diff -r c6f88e7f95b7 -r c87ba0a6fb79 mercurial/parsers.c --- a/mercurial/parsers.c Sat Aug 11 12:45:53 2012 -0500 +++ b/mercurial/parsers.c Mon Aug 13 11:49:55 2012 -0700 @@ -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);