]> granicus.if.org Git - php/commitdiff
Fixed infinite loop bug when an invalid quoted-printable escape sequence
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 12 Jan 2003 13:46:11 +0000 (13:46 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 12 Jan 2003 13:46:11 +0000 (13:46 +0000)
appears in the streem.

ext/standard/filters.c

index 99b377e18bbb6e4b25a2a2d303d964d2f4d1d7e9..be7346fc2e6408f458171fb788c43ef5a836b676 100644 (file)
@@ -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;