From bf5ca65c2d34046dd8f2dfb89164f3e55f6a3396 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 12 Nov 2001 22:26:10 +0000 Subject: load_string(): Force use of unsigned compare in a context that was clearly (but incorrectly) assuming it. --- Modules/cPickle.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index f8a3c1c..54a1151 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) -- cgit v0.12