]> granicus.if.org Git - php/commitdiff
Fixed bug #34321 (Possible crash in filter code).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 25 Sep 2005 13:26:19 +0000 (13:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 25 Sep 2005 13:26:19 +0000 (13:26 +0000)
ext/standard/filters.c

index 27cdf062227a06eabf6b400750ae1f74f7c68ec6..5a4ef15a952730c90a1cf5867685ef1a22f88870 100644 (file)
@@ -943,7 +943,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins
                                CONSUME_CHAR(ps, icnt, lb_ptr, lb_cnt);
                        }
                } else if ((!(opts & PHP_CONV_QPRINT_OPT_FORCE_ENCODE_FIRST) || line_ccnt < inst->line_len) && ((c >= 33 && c <= 60) || (c >= 62 && c <= 126))) { 
-                       if (line_ccnt < 2) {
+                       if (line_ccnt < 2 && inst->lbchars != NULL) {
                                if (ocnt < inst->lbchars_len + 1) {
                                        err = PHP_CONV_ERR_TOO_BIG;
                                        break;