From: Moriyoshi Koizumi Date: Sun, 12 Jan 2003 13:46:11 +0000 (+0000) Subject: Fixed infinite loop bug when an invalid quoted-printable escape sequence X-Git-Tag: PHP_5_0_dev_before_13561_fix~288 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a88173bf86c908c7043ccb8418c53e1b6080a472;p=php Fixed infinite loop bug when an invalid quoted-printable escape sequence appears in the streem. --- diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 99b377e18b..be7346fc2e 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -675,7 +675,8 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins unsigned int nbl = (*ps >= 'A' ? *ps - 0x37 : *ps - 0x30); if (nbl > 15) { - return 0; + err = PHP_CONV_ERR_INVALID_SEQ; + goto out; } v = (v << 4) | nbl;