1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/digest] Avoid null pointer subtraction in digest/md5

Fixes warning on Clang 13.

Fixes [Bug ]

https://github.com/ruby/digest/commit/32135c7487
This commit is contained in:
xtkoba 2021-10-13 08:40:48 -07:00 committed by Hiroshi SHIBATA
parent 7a816b5fc8
commit fed65e6a48

View file

@ -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 {