PHP 4.0 Bug #5454: main.c:370: incompatible types in assignment

From: Date: Sat, 08 Jul 2000 09:29:10 +0000
Subject: PHP 4.0 Bug #5454: main.c:370: incompatible types in assignment
Groups: php.dev 
Request: Send a blank email to php-dev+get-23785@lists.php.net to get a copy of this message
From: edwintam@ieee.org Operating system: LinuxPPC PHP version: 4.0.1pl2 PHP Bug Type: Compile Failure Bug description: main.c:370: incompatible types in assignment Compiling on LinuxPPC yields the following errors: main.c: In function `php_error_cb': main.c:370: incompatible types in assignment main.c:435: incompatible types in assignment make[2]: *** [main.lo] Error 1 make[2]: Leaving directory `/home/root/php-4.0.1/main' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/root/php-4.0.1/main' make: *** [all-recursive] Error 1 Compiling on x86 platform did NOT have this problem, not because the code is okay but this segment is never being compiled. Upon inspection of the code, i found someone trying to assign an Array type to another Array type, causing the above error. The correct method should use memcpy(). The programmer who did this might thought he/she is using pointers... Substituting args = orig_args by memcpy(args, orig_args, sizeof(args)) will fix the errors, though. However, more boundary checking and buffer overflow prevention stuffs need to be done here.

« previous php.dev (#23785) next »