]> granicus.if.org Git - php/commit
Check string bounds in strspn/strcspn
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 08:42:24 +0000 (10:42 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 08:46:50 +0000 (10:46 +0200)
commit5d9ab53a5d53f11a18ae11ed31b17ff87c8d52a7
treef3de54137489c2fdbd135f708de6c4191d486518
parent12e772f18dcf0116935e5fad8443a717e4ffde8e
Check string bounds in strspn/strcspn

strspn/strcspn are string search functions, and as such should throw
ValueError on out-of-bounds offsets, just like strpos etc do.
15 files changed:
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h
ext/standard/string.c
ext/standard/tests/strings/bug40754.phpt
ext/standard/tests/strings/strcspn.phpt
ext/standard/tests/strings/strcspn_basic.phpt
ext/standard/tests/strings/strcspn_variation11.phpt
ext/standard/tests/strings/strcspn_variation12.phpt
ext/standard/tests/strings/strcspn_variation7.phpt [deleted file]
ext/standard/tests/strings/strcspn_variation8.phpt [deleted file]
ext/standard/tests/strings/strspn_basic.phpt
ext/standard/tests/strings/strspn_variation11.phpt
ext/standard/tests/strings/strspn_variation12.phpt
ext/standard/tests/strings/strspn_variation7.phpt [deleted file]
ext/standard/tests/strings/strspn_variation8.phpt [deleted file]