Replaced some large local variables by other means
This commit is contained in:
@ -252,7 +252,7 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
int ret, options, system_area_options, iso_lba= -1, start_lba, image_blocks;
|
||||
char volid[33];
|
||||
FILE *fp= NULL;
|
||||
char buf[32768], *bufpt= NULL;
|
||||
char *buf= NULL, *bufpt= NULL;
|
||||
off_t hd_lba;
|
||||
unsigned char *ub;
|
||||
ElToritoBootImage *bootimg;
|
||||
@ -260,6 +260,7 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
|
||||
uint32_t offst;
|
||||
enum burn_disc_status state;
|
||||
|
||||
Xorriso_alloc_meM(buf, char, 32768);
|
||||
system_area_options= xorriso->system_area_options;
|
||||
memset(buf, 0, 32768);
|
||||
if(xorriso->system_area_disk_path[0] == 0) {
|
||||
@ -379,6 +380,7 @@ do_set:;
|
||||
ex:;
|
||||
if(fp != NULL && fp != stdin)
|
||||
fclose(fp);
|
||||
Xorriso_free_meM(buf);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@ -1896,7 +1898,7 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode,
|
||||
char *npt, *cpt;
|
||||
int l, was, value, ret;
|
||||
struct isoburn_imgen_opts *opts= NULL;
|
||||
char msg[160];
|
||||
char *msg= NULL;
|
||||
off_t limit;
|
||||
|
||||
was= xorriso->relax_compliance;
|
||||
@ -2065,10 +2067,13 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode,
|
||||
if(xorriso->file_size_limit < Xorriso_default_file_size_limiT)
|
||||
xorriso->file_size_limit= Xorriso_default_file_size_limiT;
|
||||
} else {
|
||||
Xorriso_alloc_meM(msg, char, 160);
|
||||
sprintf(msg,
|
||||
"-compliance iso_9660_level=%d : Only 1, 2, or 3 are permissible",
|
||||
value);
|
||||
Xorriso_msgs_submit(xorriso, 0, msg, 0, "FAILURE", 0);
|
||||
Xorriso_free_meM(msg);
|
||||
msg= NULL;
|
||||
xorriso->relax_compliance= was;
|
||||
return(0);
|
||||
}
|
||||
@ -2103,6 +2108,9 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode,
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
ex:;
|
||||
Xorriso_free_meM(msg);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user