Skip to content

Commit 32135c7

Browse files
xtkobajeremyevans
authored andcommitted
Avoid null pointer subtraction in digest/md5
Fixes warning on Clang 13. Fixes [Bug #18076]
1 parent 1cb6bac commit 32135c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/digest/md5/md5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
225225
uint32_t xbuf[16];
226226
const uint32_t *X;
227227

228-
if (!((data - (const uint8_t *)0) & 3)) {
228+
if (!(((uintptr_t)data) & 3)) {
229229
/* data are properly aligned */
230230
X = (const uint32_t *)data;
231231
} else {

0 commit comments

Comments
 (0)