File php-CVE-2016-8670.patch of Package php5.openSUSE_Leap_42.1_Update
Index: php-7.0.7/ext/gd/libgd/gd_io_dp.c
===================================================================
--- php-7.0.7.orig/ext/gd/libgd/gd_io_dp.c 2016-10-20 12:01:53.829873381 +0200
+++ php-7.0.7/ext/gd/libgd/gd_io_dp.c 2016-10-20 12:02:52.494755227 +0200
@@ -237,7 +237,7 @@ static int dynamicGetbuf (gdIOCtxPtr ctx
if (remain >= len) {
rlen = len;
} else {
- if (remain == 0) {
+ if (remain <= 0) {
return EOF;
}
rlen = remain;