From: Andrew M. Kuchling Date: Wed, 2 Aug 2000 13:41:18 +0000 (+0000) Subject: Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal X-Git-Tag: v2.0b1~618 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b96d0b199838842f15ef3bd3ed490386c7d0c06;p=thirdparty%2FPython%2Fcpython.git Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal escape, as documented in the comment for the check_escape() function --- diff --git a/Modules/pypcre.c b/Modules/pypcre.c index 11c7ce955274..c6a14ec52813 100644 --- a/Modules/pypcre.c +++ b/Modules/pypcre.c @@ -1032,7 +1032,7 @@ else for(c=0, i=0; ptr[i]!=0 && i<3; i++) { if (( pcre_ctypes[ ptr[i] ] & ctype_odigit) != 0) - c = c * 8 + ptr[i]-'0'; + c = (c * 8 + ptr[i]-'0') & 255; else break; /* Non-octal character--break out of the loop */ }