]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: test-strfuncs - Avoid testing p_strndup() with overlong max_chars parameter
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 27 Sep 2021 08:49:05 +0000 (11:49 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 27 Sep 2021 08:49:05 +0000 (11:49 +0300)
commit0a70b02bbb44ecb774562cb8b4559b2ec823c2d1
tree113935b25a1cd30c47a881f8778fcf6caf4f1f28
parent211040d8369630621d8908025a1df4db5a8cc097
lib: test-strfuncs - Avoid testing p_strndup() with overlong max_chars parameter

This ended up in memchr() call with n=SIZE_MAX-1, which sometimes doesn't
work right with old glibc versions.

Fixes:
Panic: Trying to allocate 18446744073709551615 bytes
src/lib/test-strfuncs.c