diff 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
line wrap: on
line diff
--- a/libtomcrypt/src/pk/rsa/rsa_export.c	Thu Mar 21 23:28:59 2019 +0800
+++ b/libtomcrypt/src/pk/rsa/rsa_export.c	Fri Jun 26 21:07:34 2020 +0800
@@ -58,7 +58,7 @@
       unsigned char* tmp = NULL;
 
       if (type & PK_STD) {
-          tmplen = (mp_count_bits(key->N)/8)*2+8;
+          tmplen = (unsigned long)(mp_count_bits(key->N) / 8) * 2 + 8;
           tmp = XMALLOC(tmplen);
           ptmplen = &tmplen;
           if (tmp == NULL) {