commit 70adb1252dd154bd6517af49e916b8f2d4deeac9 parent bbe10559e6d9b06c23cb7fafc02b41cf04077f3a Author: FRIGN <dev@frign.de> Date: Sat, 20 Feb 2016 21:50:21 +0100 Do a range check on the resulting octal Diffstat:
M | libutil/unescape.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libutil/unescape.c b/libutil/unescape.c @@ -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++)