diff --git a/crypto777/jpeg/unix/jmemname.c b/crypto777/jpeg/unix/jmemname.c index fd09935aa..e6a89ea11 100755 --- a/crypto777/jpeg/unix/jmemname.c +++ b/crypto777/jpeg/unix/jmemname.c @@ -70,7 +70,7 @@ extern void free JPP((void *ptr)); */ #ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ -#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ +#define TEMP_DIRECTORY "/tmp/" /* recommended setting for Unix */ #endif static int next_file_num; /* to distinguish among several temp files */ diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index 246d961b3..95595ef05 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -597,10 +597,13 @@ char *LP_jpg(char *srcfile,char *destfile,int32_t power2,char *passphrase,char * } if ( decoded != 0 ) { - decodedstr = calloc(1,len*2+1); - init_hexbytes_noT(decodedstr,decoded,len); - jaddstr(retjson,"decoded",decodedstr); - free(decodedstr); + if ( capacity > 0 ) + { + decodedstr = calloc(1,len*2+1); + init_hexbytes_noT(decodedstr,decoded,len); + jaddstr(retjson,"decoded",decodedstr); + free(decodedstr); + } free(decoded); } if ( data != 0 )