From man malloc:
Nonportable behavior
The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior.
Two unit tests with empty plain text will fail on systems where malloc(0) returns NULL, e.g., AIX:
check_jwe.c:172:F:core:test_cjose_jwe_self_encrypt_self_decrypt_empty:0: cjose_jwe_encrypt [RSA-OAEP/A128GCM] failed: out of memory, file: src/jwe.c, function: _cjose_jwe_malloc, line: 198
check_jws.c:113:F:core:test_cjose_jws_self_sign_self_verify_empty:0: cjose_jws_sign [PS256] failed: out of memory, file: src/jws.c, function: _cjose_jws_build_dat, line: 145
Also test_cjose_jwe_self_encrypt_self_decrypt_many will fail for RSA-OAEP + A128GCM if the first random byte it generates is zero.
From
man malloc:Two unit tests with empty plain text will fail on systems where malloc(0) returns NULL, e.g., AIX:
Also
test_cjose_jwe_self_encrypt_self_decrypt_manywill fail for RSA-OAEP + A128GCM if the first random byte it generates is zero.