Skip to content

Commit a10093e

Browse files
committed
Use explicit unaligned type in md5 implementation
1 parent a12fe30 commit a10093e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/standard/md5.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
167167
* doesn't work.
168168
*/
169169
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
170+
typedef ZEND_SET_ALIGNED(1, uint32_t unaligned_uint32_t);
170171
# define SET(n) \
171-
(*(uint32_t *)&ptr[(n) * 4])
172+
(*(unaligned_uint32_t *)&ptr[(n) * 4])
172173
# define GET(n) \
173174
SET(n)
174175
#else

0 commit comments

Comments
 (0)