]> granicus.if.org Git - php/commit
Avoid memset/memcpy null ub in block pass
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 20 Jun 2019 07:49:07 +0000 (09:49 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 20 Jun 2019 07:49:07 +0000 (09:49 +0200)
commitccfe6c862a9ad27d641dc6d5cd8386fe2b912acc
tree0c90641d2d04a567bc3df4a1e028d563756d0e1e
parent05c8f1ff2e34e76cfe38ae2a03d43f428fa7194e
Avoid memset/memcpy null ub in block pass

The arena allocator has no problem with zero-size allocations (and
will just return the same pointer for each in this case), so just
do that to avoid null pointers.
ext/opcache/Optimizer/block_pass.c