ID:               50987
 Updated by:       [email protected]
 Reported By:      geissert at debian dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         PHAR related
 Operating System: linux ia64
 PHP Version:      5.3.1
 New Comment:

hi,

Can you provide test cases for these crashes please? As well as your
settings (CFLAGS&co) as I can't see crashes on IA64 here (or other 64bit
platforms). Same applies for your other reports :)

Thanks for your feedback!


Previous Comments:
------------------------------------------------------------------------

[2010-02-10 07:27:23] geissert at debian dot org

Description:
------------
There's an unaligned memory access in ext/phar/phar.c's phar_set_32
function.

The following patch fixes it:

--- php.orig/ext/phar/phar.c
+++ php/ext/phar/phar.c
@@ -2491,7 +2491,7 @@ static inline void phar_set_32(char *buf
        *((buffer) + 1) = (unsigned char) (((var) >> 8) & 0xFF);
        *((buffer) + 0) = (unsigned char) ((var) & 0xFF);
 #else
-       *(php_uint32 *)(buffer) = (php_uint32)(var);
+       memcpy(buffer, &var, sizeof(var));
 #endif
 } /* }}} */




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50987&edit=1

Reply via email to