com php-src: Avoid signed shift ub in php_sdl: ext/soap/p hp_sdl.c
| From: | Nikita Popov | Date: | Wed, 19 Jun 2019 15:27:09 +0000 |
| Subject: | com php-src: Avoid signed shift ub in php_sdl: ext/soap/p hp_sdl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106918@lists.php.net to get a copy of this message | ||
Commit: 8743d5e99acd59504bdf34e65d2ba25f20d76970
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 19 Jun 2019 17:25:20 +0200
Parents: 608097a901fb28d3b1ed0ff4ea2bb76ae9bb1272
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8743d5e99acd59504bdf34e65d2ba25f20d76970
Log:
Avoid signed shift ub in php_sdl
Changed paths:
M ext/soap/php_sdl.c
Diff:
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index de4bf5c..510d03c 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -1178,7 +1178,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
#define WSDL_CACHE_VERSION 0x10
#define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type);
-#define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned
char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4;
+#define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned
char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((unsigned)(*buf)[3]<<24); *buf
+= 4;
#define WSDL_CACHE_GET_1(ret,type,buf) ret = (type)(**buf); (*buf)++;
#define WSDL_CACHE_GET_N(ret,n,buf) memcpy(ret,*buf,n); *buf += n;
#define WSDL_CACHE_SKIP(n,buf) *buf += n;