fix raw import inits

pull/1/head
toddouska 2014-08-29 14:33:48 -07:00
parent 7e7cbdc715
commit dbfe2aa242
1 changed files with 5 additions and 2 deletions

View File

@ -2313,11 +2313,14 @@ int ecc_rs_to_sig(const char* r, const char* s, byte* out, word32* outlen)
mp_int rtmp; mp_int rtmp;
mp_int stmp; mp_int stmp;
if (r == NULL || s == NULL || out == NULL) if (r == NULL || s == NULL || out == NULL || outlen == NULL)
return ECC_BAD_ARG_E; return ECC_BAD_ARG_E;
err = mp_read_radix(&rtmp, r, 16); err = mp_init_multi(&rtmp, &stmp, NULL, NULL, NULL, NULL);
if (err != MP_OKAY)
return err;
err = mp_read_radix(&rtmp, r, 16);
if (err == MP_OKAY) if (err == MP_OKAY)
err = mp_read_radix(&stmp, s, 16); err = mp_read_radix(&stmp, s, 16);