#28439 [Fbk->NoF]: improper C type conversion in php-4.3.6/ext/standard/var_unserialize.c line 310

From: Date: Sat, 29 May 2004 23:00:05 +0000
Subject: #28439 [Fbk->NoF]: improper C type conversion in php-4.3.6/ext/standard/var_unserialize.c line 310
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60142@lists.php.net to get a copy of this message
ID: 28439 Updated by: php-bugs@lists.php.net Reported By: rjc at mit dot edu -Status: Feedback +Status: No Feedback Bug Type: Compile Warning Operating System: rh-9 PHP Version: 4.3.6 New Comment: No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2004-05-19 00:50:07] iliaa@php.net Please make the reproduce script accessible, cannot reproduce the problem given existing information. ------------------------------------------------------------------------ [2004-05-18 22:36:11] rjc at mit dot edu Description: ------------ Need a explicit type cast... original source: if(yych <= '\277') goto yy15; patched: if(yych <= (YYCTYPE)'\277') goto yy15; Reproduce code: --------------- http://barajas.mit.edu/php_bug/test.php.txt // just the relevant bits here - see url for a working program <?php if (isSet($_POST["submit"])) print_r($_POST["a"]); ?> <form method = "post" action = ""> <input type = "hidden" name = "a[]" value = "val1"> <input type = "hidden" name = "a[]" value = "val2"> <input type = "hidden" name = "a[]" value = "val3"> <input type = "submit" name = "submit" value = "submit"> </form> Expected result: ---------------- The array $_POST["a"] should have three strings in it after the form is submitted. Unpatched PHP-4.3.6 would repeat the last two values in additional two array slots. Forms submitted via get didn't exhibit this behavior. Scalars passed via post also did not exhibit this behavior. After I patched the C code as above, I got three and only three strings back in $_POST["a], which is what I'd expect. Actual result: -------------- Array ( [0] => val1 [1] => val2 [2] => val3 [3] => val2 [4] => val3) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28439&edit=1

« previous php.bugs (#60142) next »