Skip to content

Commit

Permalink
Fixed bug #50987 (unaligned memory access in phar.c)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Nov 20, 2010
1 parent 4415b3a commit 5f1b91a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Fixed crashes on invalid parameters in intl extension (Stas, Maksymilian
Arciemowicz)
- Fixed bug #53362 (Segmentation fault when extending SplFixedArray). (Felipe)
- Fixed bug #50987 (unaligned memory access in phar.c).
(geissert at debian dot org, Ilia)
- Fixed bug #47168 (printf of floating point variable prints maximum of 40
decimal places). (Ilia)

Expand Down
2 changes: 1 addition & 1 deletion ext/phar/phar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,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
} /* }}} */

Expand Down

0 comments on commit 5f1b91a

Please sign in to comment.