зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla Bug 302262: Check for SECITEM_AllocItem failure in
MPINT_TO_SECITEM. r=nelsonb.
This commit is contained in:
Родитель
a82541564d
Коммит
b5b833a9c0
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
#define MPINT_TO_SECITEM(mp, it, arena) \
|
#define MPINT_TO_SECITEM(mp, it, arena) \
|
||||||
SECITEM_AllocItem(arena, (it), mp_unsigned_octet_size(mp)); \
|
SECITEM_AllocItem(arena, (it), mp_unsigned_octet_size(mp)); \
|
||||||
|
if ((it)->data == NULL) {err = MP_MEM; goto cleanup;} \
|
||||||
err = mp_to_unsigned_octets(mp, (it)->data, (it)->len); \
|
err = mp_to_unsigned_octets(mp, (it)->data, (it)->len); \
|
||||||
if (err < 0) goto cleanup; else err = MP_OKAY;
|
if (err < 0) goto cleanup; else err = MP_OKAY;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче