summaryrefslogtreecommitdiff
path: root/ext/phar/phar.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-11-20 19:27:31 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-11-20 19:27:31 +0000
commit3016ad46ae5a8af956609d873a49681b11967742 (patch)
treed5ab2dec8aa3c775358ee09d111133ff8a66fe37 /ext/phar/phar.c
parent0ba1cd1bd287c0b5b1eb29ffde604e406bddb362 (diff)
downloadphp-git-3016ad46ae5a8af956609d873a49681b11967742.tar.gz
Fixed bug #50987 (unaligned memory access in phar.c)
Diffstat (limited to 'ext/phar/phar.c')
-rw-r--r--ext/phar/phar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 062655af96..ddd686d00e 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2489,7 +2489,7 @@ static inline void phar_set_32(char *buffer, int var) /* {{{ */
*((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
} /* }}} */