Prevented use of uninitialized variable in case of memory shortage. Coverity CID 28808.

master
Thomas Schmitt 7 years ago
parent 64e2790557
commit 52d09aaf24
  1. 7
      xorriso/disk_ops.c
  2. 2
      xorriso/xorriso_timestamp.h

@ -360,6 +360,10 @@ int Xorriso_show_dux_subs(struct XorrisO *xorriso,
struct LinkiteM *own_link_stack;
char *path= NULL, *show_path= NULL, *name= NULL, *sfe= NULL;
own_link_stack= link_stack;
namept= name;
*size= 0;
sfe= malloc(5*SfileadrL);
path= malloc(SfileadrL);
show_path= malloc(SfileadrL);
@ -368,9 +372,6 @@ int Xorriso_show_dux_subs(struct XorrisO *xorriso,
Xorriso_no_malloc_memory(xorriso, &sfe, 0);
{ret= -1; goto ex;}
}
own_link_stack= link_stack;
namept= name;
*size= 0;
if(lstat(abs_path, &stbuf)==-1)
{ret= 2; goto ex;}

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.06.124702"
#define Xorriso_timestamP "2015.11.06.125101"

Loading…
Cancel
Save