cvs: php-src /ext/phar tar.c

From: Date: Sun, 15 Feb 2009 18:52:11 +0000
Subject: cvs: php-src /ext/phar tar.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56261@lists.php.net to get a copy of this message
cellog Sun Feb 15 18:52:11 2009 UTC Modified files: /php-src/ext/phar tar.c Log: MFB: fix setting of 32-bit values on big-endian systems http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.65&r2=1.66&diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.65 php-src/ext/phar/tar.c:1.66 --- php-src/ext/phar/tar.c:1.65 Wed Dec 31 11:12:35 2008 +++ php-src/ext/phar/tar.c Sun Feb 15 18:52:11 2009 @@ -1084,10 +1084,10 @@ #ifdef WORDS_BIGENDIAN # define PHAR_SET_32(var, buffer) \ - *(php_uint32 *)(var) = (((((unsigned char*)(buffer))[3]) << 24) \ - | ((((unsigned char*)(buffer))[2]) << 16) \ - | ((((unsigned char*)(buffer))[1]) << 8) \ - | (((unsigned char*)(buffer))[0])) + *(php_uint32 *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \ + | ((((unsigned char*)&(buffer))[2]) << 16) \ + | ((((unsigned char*)&(buffer))[1]) << 8) \ + | (((unsigned char*)&(buffer))[0])) #else # define PHAR_SET_32(var, buffer) *(php_uint32 *)(var) = (php_uint32) (buffer) #endif

« previous php.cvs (#56261) next »