comparison libtomcrypt/src/pk/rsa/rsa_export.c @ 1733:d529a52b2f7c coverity coverity

merge coverity from main
author Matt Johnston <matt@ucc.asn.au>
date Fri, 26 Jun 2020 21:07:34 +0800
parents e9dba7abd939
children
comparison
equal deleted inserted replaced
1643:b59623a64678 1733:d529a52b2f7c
56 /* public key */ 56 /* public key */
57 unsigned long tmplen, *ptmplen; 57 unsigned long tmplen, *ptmplen;
58 unsigned char* tmp = NULL; 58 unsigned char* tmp = NULL;
59 59
60 if (type & PK_STD) { 60 if (type & PK_STD) {
61 tmplen = (mp_count_bits(key->N)/8)*2+8; 61 tmplen = (unsigned long)(mp_count_bits(key->N) / 8) * 2 + 8;
62 tmp = XMALLOC(tmplen); 62 tmp = XMALLOC(tmplen);
63 ptmplen = &tmplen; 63 ptmplen = &tmplen;
64 if (tmp == NULL) { 64 if (tmp == NULL) {
65 return CRYPT_MEM; 65 return CRYPT_MEM;
66 } 66 }