diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index d56f759a5..6f186e0f9 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -599,7 +599,8 @@ char *LP_jpg(char *srcfile,char *destfile,int32_t power2,char *passphrase,char * { if ( capacity > 0 ) { - decodedstr = calloc(1,required/8+1); + printf("len.%d required.%d capacity.%d\n",len,required,capacity); + decodedstr = calloc(1,(len+required)*2+1); init_hexbytes_noT(decodedstr,decoded,required/8+1); jaddstr(retjson,"decoded",decodedstr); free(decodedstr); diff --git a/iguana/exchanges/jpg b/iguana/exchanges/jpg index fd5685554..b84c7bd56 100755 --- a/iguana/exchanges/jpg +++ b/iguana/exchanges/jpg @@ -1,2 +1,3 @@ source userpass -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"jpg\",\"srcfile\":\"utxos.jpg\",\"destfile\":\"utxosdest.jpg\",\"power2\":3,\"passphrase\":\"default\",\"data\":\"68656c6c6f20776f726c64\",\"required\":\"required\"}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"jpg\",\"srcfile\":\"/root/boost_1_64_0/libs/gil/doc/doxygen/images/monkey_steps.jpg\",\"destfile\":\"dest.jpg\",\"power2\":3,\"passphrase\":\"default\",\"data\":\"68656c6c6f20776f726c64\",\"required\":11}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"jpg\",\"srcfile\":\"dest.jpg\",\"power2\":3,\"passphrase\":\"default\",\"required\":11}"