]> granicus.if.org Git - php/commit
Fix overflow checks in mbfl_memory_device
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 23 Jul 2017 09:33:05 +0000 (11:33 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 23 Jul 2017 09:55:43 +0000 (11:55 +0200)
commit42ff1aa86ccb24e35c058385ef61c737024ea3fc
treed572bb5e0419646eb833b83dbf8438920fb5f2d3
parentbd63c0f5b3efd1689a231fccebe74e798e1bbd88
Fix overflow checks in mbfl_memory_device

Also prune out some duplicate code and use strlen() and memcpy()
instead of ad-hoc reimplementations. Remove multiplications by
sizeof(unsigned char), which wrongly imply that this can be
anything but 1.
ext/mbstring/libmbfl/mbfl/mbfl_defs.h
ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c