Do a range check on the resulting octal

This commit is contained in:
FRIGN 2016-02-20 21:50:21 +01:00 committed by sin
parent bbe10559e6
commit 70adb1252d

View File

@ -62,7 +62,7 @@ unescape(char *s)
q += (s[m] - '0') * factor;
factor *= 8;
}
s[i] = q;
s[i] = (q > 255) 255 : q;
}
for (m = i + 1; m <= len - off; m++)