load_string(): Force use of unsigned compare in a context that was

clearly (but incorrectly) assuming it.
This commit is contained in:
Tim Peters 2001-11-12 22:26:10 +00:00
parent f8197d4f9f
commit bf5ca65c2d
1 changed files with 8 additions and 6 deletions

View File

@ -2821,12 +2821,14 @@ load_string(Unpicklerobject *self) {
if (*p==q && nslash%2==0) break; if (*p==q && nslash%2==0) break;
if (*p=='\\') nslash++; if (*p=='\\') nslash++;
else nslash=0; else nslash=0;
} }
if (*p==q) if (*p == q) {
{ for (p++; *p; p++)
for (p++; *p; p++) if (*p > ' ') goto insecure; if (*(unsigned char *)p > ' ')
} goto insecure;
else goto insecure; }
else
goto insecure;
/********************************************/ /********************************************/
UNLESS (eval_dict) UNLESS (eval_dict)