From fdf0768d4ecf47d8e99e8d71898a5e17555d5564 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Wed, 15 Jan 2003 15:05:17 +0000 Subject: [PATCH] Fixed a qp encoder bug that the constructor sometimes fails if line-breaking mode is off. --- ext/standard/filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.50.1