From a10093eee17ed7a3f3bbd9560aa4db00710323df Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 29 Aug 2019 12:58:22 +0200 Subject: [PATCH] Use explicit unaligned type in md5 implementation --- ext/standard/md5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 5bf29be286..463279a497 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -167,8 +167,9 @@ PHP_NAMED_FUNCTION(php_if_md5_file) * doesn't work. */ #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +typedef ZEND_SET_ALIGNED(1, uint32_t unaligned_uint32_t); # define SET(n) \ - (*(uint32_t *)&ptr[(n) * 4]) + (*(unaligned_uint32_t *)&ptr[(n) * 4]) # define GET(n) \ SET(n) #else -- 2.40.0