Message-ID: <
19990722224859.A27987@homer.diplex.co.uk>
Subject: [PATCH 5.005_57] sv_reset can cause stack corruption
p4raw-id: //depot/perl@3758
register I32 i;
register PMOP *pm;
register I32 max;
- char todo[256];
+ char todo[PERL_UCHAR_MAX+1];
if (!stash)
return;
Zero(todo, 256, char);
while (*s) {
- i = *s;
+ i = (unsigned char)*s;
if (s[1] == '-') {
s += 2;
}
- max = *s++;
+ max = (unsigned char)*s++;
for ( ; i <= max; i++) {
todo[i] = 1;
}