Bug fix: -boot_image "any" "system_area=/dev/zero" did not zeroize loaded data

master
Thomas Schmitt 7 years ago
parent 0365cffbc5
commit a270ad22f9
  1. 1
      xorriso/base_obj.c
  2. 2
      xorriso/drive_mgt.c
  3. 2
      xorriso/iso_img.c
  4. 2
      xorriso/opts_a_c.c
  5. 5
      xorriso/write_run.c
  6. 1
      xorriso/xorriso_private.h
  7. 2
      xorriso/xorriso_timestamp.h

@ -274,6 +274,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->boot_efi_default= 0;
m->system_area_disk_path[0]= 0;
m->system_area_clear_loaded= 0;
m->system_area_options= 0;
m->patch_system_area= 0;
m->partition_offset= 0;

@ -471,6 +471,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
Xorriso_destroy_hln_array(xorriso, 0);
Xorriso_destroy_di_array(xorriso, 0);
xorriso->boot_count= 0;
xorriso->system_area_clear_loaded=
(strcmp(xorriso->system_area_disk_path, "/dev/zero") == 0);
/* check for invalid state */
if(state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE &&

@ -113,6 +113,8 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
Xorriso_update_volid(xorriso, 0);
xorriso->volset_change_pending= 0;
xorriso->boot_count= 0;
xorriso->system_area_clear_loaded=
(strcmp(xorriso->system_area_disk_path, "/dev/zero") == 0);
xorriso->no_volset_present= 0;
return(1);
}

@ -1006,6 +1006,8 @@ treatment_patch:;
if(ret <= 0)
goto ex;
xorriso->system_area_options&= ~0x4000;
if(strcmp(treatpt + 12, "/dev/zero") == 0)
xorriso->system_area_clear_loaded= 1;
} else if(strncmp(treatpt, "partition_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0) {

@ -440,7 +440,10 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
Xorriso_alloc_meM(buf, char, 32768);
memset(buf, 0, 32768);
system_area_options= xorriso->system_area_options;
sa_loaded= iso_image_get_system_area(img, buf, &options, 0);
if(xorriso->system_area_clear_loaded)
sa_loaded= 0;
else
sa_loaded= iso_image_get_system_area(img, buf, &options, 0);
if(sa_loaded < 0) {
Xorriso_process_msg_queues(xorriso,0);
Xorriso_report_iso_error(xorriso, "", sa_loaded,

@ -411,6 +411,7 @@ struct XorrisO { /* the global context of xorriso */
1= appy --efi-boot parameters when attaching to img */
char system_area_disk_path[SfileadrL];
int system_area_clear_loaded;
int system_area_options; /* bit0= "GRUB protective msdos label"
(a simple partition table)
bit1= isohybrid boot image pointer

@ -1 +1 @@
#define Xorriso_timestamP "2015.12.22.133736"
#define Xorriso_timestamP "2015.12.23.112013"

Loading…
Cancel
Save