comparison bignum.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 1051e4eea25a
children 8b4274d34fe8
comparison
equal deleted inserted replaced
1643:b59623a64678 1733:d529a52b2f7c
84 va_end(args); 84 va_end(args);
85 } 85 }
86 86
87 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) { 87 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) {
88 88
89 if (mp_read_unsigned_bin(mp, (unsigned char*)bytes, len) != MP_OKAY) { 89 if (mp_from_ubin(mp, (unsigned char*)bytes, len) != MP_OKAY) {
90 dropbear_exit("Mem alloc error"); 90 dropbear_exit("Mem alloc error");
91 } 91 }
92 } 92 }
93 93
94 /* hash the ssh representation of the mp_int mp */ 94 /* hash the ssh representation of the mp_int mp */