summaryrefslogtreecommitdiff
path: root/ext/xmlrpc
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-11-05 13:59:35 -0700
committerStanislav Malyshev <stas@php.net>2016-11-05 13:59:35 -0700
commitf7f8aae33cdaf74ca2d360ccf24256d6afd99b39 (patch)
tree482f035296f161367dfdf769f1520364716d5118 /ext/xmlrpc
parent86ae78d7c67cf9b43dbee0033557058e5901047f (diff)
parent669763d88a8bb9707a45f0937a129b63a161d2f0 (diff)
downloadphp-git-f7f8aae33cdaf74ca2d360ccf24256d6afd99b39.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: More int->size_t and string overflow fixes
Diffstat (limited to 'ext/xmlrpc')
-rw-r--r--ext/xmlrpc/libxmlrpc/simplestring.c2
-rw-r--r--ext/xmlrpc/libxmlrpc/simplestring.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/xmlrpc/libxmlrpc/simplestring.c b/ext/xmlrpc/libxmlrpc/simplestring.c
index 98b5c81e42..585cac02aa 100644
--- a/ext/xmlrpc/libxmlrpc/simplestring.c
+++ b/ext/xmlrpc/libxmlrpc/simplestring.c
@@ -201,7 +201,7 @@ void simplestring_addn(simplestring* target, const char* source, size_t add_len)
simplestring_init_str(target);
}
- if((INT_MAX - add_len) < target->len || (INT_MAX - add_len - 1) < target->len) {
+ if((SIZE_MAX - add_len) < target->len || (SIZE_MAX - add_len - 1) < target->len) {
/* check for overflows, if there's a potential overflow do nothing */
return;
}
diff --git a/ext/xmlrpc/libxmlrpc/simplestring.h b/ext/xmlrpc/libxmlrpc/simplestring.h
index b46b0d779a..cb0c820e79 100644
--- a/ext/xmlrpc/libxmlrpc/simplestring.h
+++ b/ext/xmlrpc/libxmlrpc/simplestring.h
@@ -50,8 +50,8 @@ extern "C" {
*/
typedef struct _simplestring {
char* str; /* string buf */
- int len; /* length of string/buf */
- int size; /* size of allocated buffer */
+ size_t len; /* length of string/buf */
+ size_t size; /* size of allocated buffer */
} simplestring;
/******/