Skip to content

Commit 06e6202

Browse files
committed
Fix warning
1 parent e41d311 commit 06e6202

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/standard/yescrypt/yescrypt-opt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,14 @@ static int yescrypt_kdf_body(const yescrypt_shared_t *shared,
11861186
N > SIZE_MAX / 128 / r)
11871187
goto out_EINVAL;
11881188
if (flags & YESCRYPT_RW) {
1189+
/* PHP change: fix compile warning */
1190+
#if SIZEOF_SIZE_T == 8
1191+
if (N / p <= 3)
1192+
goto out_EINVAL;
1193+
#else
11891194
if (N / p <= 3 || p > SIZE_MAX / Salloc)
11901195
goto out_EINVAL;
1196+
#endif
11911197
}
11921198
#ifdef _OPENMP
11931199
else if (N > SIZE_MAX / 128 / (r * p)) {

0 commit comments

Comments
 (0)