[Pkg-php-commits] [php/debian-sid] Fix another unaligned memory access

Raphael Geissert geissert at debian.org
Wed Feb 10 23:02:09 UTC 2010


---
 debian/patches/unaligned_memory_access.patch |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/debian/patches/unaligned_memory_access.patch b/debian/patches/unaligned_memory_access.patch
index cefc597..ce51cee 100644
--- a/debian/patches/unaligned_memory_access.patch
+++ b/debian/patches/unaligned_memory_access.patch
@@ -7,6 +7,15 @@ Index: php/ext/phar/phar.c
 ===================================================================
 --- php.orig/ext/phar/phar.c
 +++ php/ext/phar/phar.c
+@@ -512,7 +512,7 @@ void phar_entry_remove(phar_entry_data *
+ 	(buffer) += 2
+ #else
+ # define PHAR_GET_32(buffer, var) \
+-	var = *(php_uint32*)(buffer); \
++	memcpy(&var, buffer, sizeof(var)); \
+ 	buffer += 4
+ # define PHAR_GET_16(buffer, var) \
+ 	var = *(php_uint16*)(buffer); \
 @@ -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);
-- 
1.6.3.3





More information about the Pkg-php-commits mailing list