mp_err mp_from_sbin(mp_int *a, const uint8_t *buf, size_t size) Any call with size <= 0 through this API may exhaust process memory Suggest to return early if size <= 0
Activity
czurnieden commentedon Apr 20, 2026
The type of
sizeissize_twhich is typicallyunsigned. Too much handholding, propose NOTABUGsjaeckel commentedon Apr 20, 2026
So there's no negative size possible, but the case for
size == 0seems to be valid.libtommath/mp_from_sbin.c
Line 12 in 652d70a
czurnieden commentedon Apr 20, 2026
You are too nice for this world! ;-)
Added a check in #597