From 32135c7487cf9bc630afabaf4ea95cf1e958899e Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Wed, 13 Oct 2021 08:40:48 -0700 Subject: [PATCH] Avoid null pointer subtraction in digest/md5 Fixes warning on Clang 13. Fixes [Bug #18076] --- ext/digest/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/digest/md5/md5.c b/ext/digest/md5/md5.c index 19fe54a..3a7fe2c 100644 --- a/ext/digest/md5/md5.c +++ b/ext/digest/md5/md5.c @@ -225,7 +225,7 @@ md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/) uint32_t xbuf[16]; const uint32_t *X; - if (!((data - (const uint8_t *)0) & 3)) { + if (!(((uintptr_t)data) & 3)) { /* data are properly aligned */ X = (const uint32_t *)data; } else {