Skip to content

Commit

Permalink
Avoid null pointer subtraction in digest/md5
Browse files Browse the repository at this point in the history
Fixes warning on Clang 13.

Fixes [Bug #18076]
  • Loading branch information
xtkoba authored and jeremyevans committed Oct 13, 2021
1 parent 1cb6bac commit 32135c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/digest/md5/md5.c
Expand Up @@ -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 {
Expand Down

0 comments on commit 32135c7

Please sign in to comment.