Fix overflow in array_slice
commit627763e8a94d477c317bd9ed9eb4f6dbc43c5f00
authorPaul Bissonnette <paulbiss@fb.com>
Tue, 2 Jun 2015 03:37:41 +0000 (1 20:37 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 9 Jun 2015 04:02:11 +0000 (8 21:02 -0700)
treeceeeceb93bd69e550ee19edc9bd1c627d3795c17
parentc1f0d7c18d0fe42c45ef679e9eec106b8735ff32
Fix overflow in array_slice

Summary: Fixed a number of overflow issues with range checking, most notably,

  ((unsigned)offset + (unsigned)len) > (unsigned)num_in

Reviewed By: @alexmalyshev

Differential Revision: D2117760
hphp/runtime/ext/array/ext_array.cpp
hphp/runtime/ext/array/ext_array.h
hphp/test/slow/ext_array/array_slice-overflow.php [new file with mode: 0644]
hphp/test/slow/ext_array/array_slice-overflow.php.expect [new file with mode: 0644]