cvs: php-src(PHP_5_2) /ext/mbstring/libmbfl/mbfl mbfilter.c
| From: | Moriyoshi Koizumi | Date: | Sat, 14 Feb 2009 08:16:21 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/mbstring/libmbfl/mbfl mbfilter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-56238@lists.php.net to get a copy of this message | ||
moriyoshi Sat Feb 14 08:16:21 2009 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/mbstring/libmbfl/mbfl mbfilter.c
Log:
- MFH: prevent unwanted overflow
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c?r1=1.7.2.5.2.4&r2=1.7.2.5.2.5&diff_format=u
Index: php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c
diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.4
php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.5
--- php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.4 Sat Feb 14 07:35:01 2009
+++ php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c Sat Feb 14 08:16:21 2009
@@ -906,6 +906,9 @@
if (offset < 0) {
negative_offset = -offset - pc.needle_len;
+ if (negative_offset < 0) {
+ negative_offset = 0;
+ }
offset = 0;
}