From: Moriyoshi Koizumi Date: Wed, 15 Jan 2003 15:05:17 +0000 (+0000) Subject: Fixed a qp encoder bug that the constructor sometimes fails if X-Git-Tag: PHP_5_0_dev_before_13561_fix~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdf0768d4ecf47d8e99e8d71898a5e17555d5564;p=php Fixed a qp encoder bug that the constructor sometimes fails if line-breaking mode is off. --- diff --git a/ext/standard/filters.c b/ext/standard/filters.c index e40a0391b0..8a90eb096a 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -838,7 +838,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins static php_conv_err_t php_conv_qprint_encode_ctor(php_conv_qprint_encode *inst, unsigned int line_len, const char *lbchars, size_t lbchars_len, int lbchars_dup, int opts, int persistent) { - if (line_len < 4) { + if (line_len < 4 && lbchars != NULL) { return PHP_CONV_ERR_TOO_BIG; } inst->_super.convert_op = (php_conv_convert_func) php_conv_qprint_encode_convert;