mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()). Compiler warning
This commit is contained in:
commit
e8c200515a
13
Zend/tests/bug75241.phpt
Normal file
13
Zend/tests/bug75241.phpt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--TEST--
|
||||||
|
Bug #75241 (Null pointer dereference in zend_mm_alloc_small())
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
function eh(){}
|
||||||
|
|
||||||
|
set_error_handler('eh');
|
||||||
|
|
||||||
|
$d->d = &$d + $d->d/=0;
|
||||||
|
var_dump($d);
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
float(INF)
|
@ -222,8 +222,10 @@ ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op) /* {{{ */
|
|||||||
if (Z_TYPE(holder) == IS_LONG) { \
|
if (Z_TYPE(holder) == IS_LONG) { \
|
||||||
if (op == result) { \
|
if (op == result) { \
|
||||||
zval_ptr_dtor(op); \
|
zval_ptr_dtor(op); \
|
||||||
|
ZVAL_LONG(op, Z_LVAL(holder)); \
|
||||||
|
} else { \
|
||||||
|
(op) = &(holder); \
|
||||||
} \
|
} \
|
||||||
(op) = &(holder); \
|
|
||||||
} \
|
} \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
|
@ -733,7 +733,7 @@ SPL_METHOD(SplDoublyLinkedList, setIteratorMode)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
intern->flags = value & SPL_DLLIST_IT_MASK | intern->flags & SPL_DLLIST_IT_FIX;
|
intern->flags = (value & SPL_DLLIST_IT_MASK) | (intern->flags & SPL_DLLIST_IT_FIX);
|
||||||
|
|
||||||
RETURN_LONG(intern->flags);
|
RETURN_LONG(intern->flags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user