php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fix_from_zval_write_control.diff for Sockets related Bug #69619

Patch version 2015-05-11 07:19 UTC

Return to Bug #69619 | Download this patch
Patch Revisions:

Developer: herumi@nifty.com

diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c
index f6a8631..374e42c 100644
--- a/ext/sockets/conversions.c
+++ b/ext/sockets/conversions.c
@@ -890,7 +890,7 @@ static void from_zval_write_control(const zval			*arr,
 		*control_buf = safe_erealloc(*control_buf, 2, req_space, *control_len);
 		*control_len += 2 * req_space;
 		memset(*control_buf, '\0', *control_len - *offset);
-		memcpy(&alloc->data, *control_buf, sizeof *control_buf);
+		memcpy(&alloc->data, control_buf, sizeof *control_buf);
 	}
 
 	cmsghdr = (struct cmsghdr*)(((char*)*control_buf) + *offset);
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 15 01:05:44 2022 UTC