moriyoshi Thu Oct 16 01:02:39 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/mbstring/libmbfl/filters mbfilter_htmlent.c
Log:
- MFH & BFN
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1258&r2=1.2027.2.547.2.1259&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1258 php-src/NEWS:1.2027.2.547.2.1259
--- php-src/NEWS:1.2027.2.547.2.1258 Thu Oct 16 00:45:21 2008
+++ php-src/NEWS Thu Oct 16 01:02:39 2008
@@ -12,6 +12,7 @@
(chsc at peytz dot dk, Felipe)
- Fixed bug #46026 (bzip2.decompress/zlib.inflate filter tries to decompress
after end of stream). (Keisial at gmail dot com, Greg)
+- Fixed buf #45722 (mb_check_encoding() crashes). (Moriyoshi)
- Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault).
(tsteiner at nerdclub dot net)
- Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas).
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c?r1=1.7&r2=1.7.4.1&diff_format=u
Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c
diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.7
php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.7.4.1
--- php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c:1.7 Mon Feb 21
10:12:43 2005
+++ php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c Thu Oct 16
01:02:39 2008
@@ -232,8 +232,7 @@
mbfl_filt_conv_html_dec_flush(filter);
if (c=='&')
{
- filter->status = 1;
- buffer[0] = '&';
+ buffer[filter->status++] = '&';
}
}
}
@@ -244,17 +243,19 @@
int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter)
{
int status, pos = 0;
- char *buffer;
+ unsigned char *buffer;
+ int err = 0;
- buffer = (char*)filter->opaque;
+ buffer = (unsigned char*)filter->opaque;
status = filter->status;
+ filter->status = 0;
/* flush fragments */
while (status--) {
- CK((*filter->output_function)(buffer[pos++], filter->data));
+ int e = (*filter->output_function)(buffer[pos++], filter->data);
+ if (e != 0)
+ err = e;
}
- filter->status = 0;
- /*filter->buffer = 0; of cause NOT*/
- return 0;
+ return err;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php