mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fix buffer growth in sockets/conversion.c
This commit is contained in:
commit
c4dd65c723
@ -910,8 +910,8 @@ static void from_zval_write_control(const zval *arr,
|
|||||||
if (space_left < req_space) {
|
if (space_left < req_space) {
|
||||||
*control_buf = safe_erealloc(*control_buf, 2, req_space, *control_len);
|
*control_buf = safe_erealloc(*control_buf, 2, req_space, *control_len);
|
||||||
*control_len += 2 * req_space;
|
*control_len += 2 * req_space;
|
||||||
memset(*control_buf, '\0', *control_len - *offset);
|
memset(*control_buf + *offset, '\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);
|
cmsghdr = (struct cmsghdr*)(((char*)*control_buf) + *offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user