From: Tim Peters Date: Mon, 12 Nov 2001 22:26:10 +0000 (+0000) Subject: load_string(): Force use of unsigned compare in a context that was X-Git-Tag: v2.2.1c1~784 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf5ca65c2d34046dd8f2dfb89164f3e55f6a3396;p=thirdparty%2FPython%2Fcpython.git load_string(): Force use of unsigned compare in a context that was clearly (but incorrectly) assuming it. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index f8a3c1c0f61f..54a115172f6f 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -2821,12 +2821,14 @@ load_string(Unpicklerobject *self) { if (*p==q && nslash%2==0) break; if (*p=='\\') nslash++; else nslash=0; - } - if (*p==q) - { - for (p++; *p; p++) if (*p > ' ') goto insecure; - } - else goto insecure; + } + if (*p == q) { + for (p++; *p; p++) + if (*(unsigned char *)p > ' ') + goto insecure; + } + else + goto insecure; /********************************************/ UNLESS (eval_dict)