|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-27 09:00 UTC] andrei@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 23:00:01 2025 UTC |
When preg_split's argc is only 1, like preg_split("/foo/"), reproduce crash. The cause of this problem is to forget the check of argc==1 in ext/pcre/php_pcre.c line 1070. 1068 /* Get function parameters and do error checking */ 1069 argc = ZEND_NUM_ARGS(); 1070 if (argc < 1 || argc > 4 || zend_get_parameters_ex(argc, ®ex, &subject, &limit, &flags) == FAILURE) { 1071 WRONG_PARAM_COUNT; 1072 } Thus this should be 1070 if (argc < 2 || argc >4 || ... This problem reason is very clear, so I don't attach gdb backtrace. Thank you.