com php-src: overflow2 is not exported by system libgd: ext/gd/libgd/gd_compat.c
| From: | Remi Collet | Date: | Mon, 22 Apr 2013 15:39:35 +0000 |
| Subject: | com php-src: overflow2 is not exported by system libgd: ext/gd/libgd/gd_compat.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71967@lists.php.net to get a copy of this message | ||
Commit: 6889a0d1f5a2eaa8103216d9cb01160e7a637f8d
Author: Remi Collet <remi@php.net> Mon, 22 Apr 2013 17:39:35 +0200
Parents: 13b039ff9ab5bb21fe2e739f666852e863aa1bf2
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6889a0d1f5a2eaa8103216d9cb01160e7a637f8d
Log:
overflow2 is not exported by system libgd
Changed paths:
M ext/gd/libgd/gd_compat.c
Diff:
diff --git a/ext/gd/libgd/gd_compat.c b/ext/gd/libgd/gd_compat.c
index 473ea20..b563290 100644
--- a/ext/gd/libgd/gd_compat.c
+++ b/ext/gd/libgd/gd_compat.c
@@ -33,3 +33,14 @@ const char * gdPngGetVersionString()
}
#endif
+int overflow2(int a, int b)
+{
+ if(a <= 0 || b <= 0) {
+ return 1;
+ }
+ if(a > INT_MAX / b) {
+ return 1;
+ }
+ return 0;
+}
+