From e654e6399a5ab1de9620d6c1e9371538044c00a1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 22 Mar 2011 08:13:59 +0000 Subject: [PATCH] Fixed use of uninitialized variable when blanking rol5 pseudo drives --- libisoburn/burn_wrap.c | 20 +++++++++----------- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index 7e48ba0c..08f02bc1 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -659,16 +659,6 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast) char zero_buffer[Libisoburn_target_head_sizE]; struct burn_multi_caps *caps= NULL; - role = burn_drive_get_drive_role(drive); - if (role == 5) { - /* libburn will truncate the random-access write-only file - to zero size and change its state */ - burn_disc_erase(drive, fast); - o->fabricated_disc_status= burn_disc_get_status(drive); - o->nwa= 0; - return; - } - ret= isoburn_find_emulator(&o, drive, 0); if(ret>0) { if(o->emulation_mode==-1) { @@ -676,7 +666,15 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast) burn_drive_cancel(drive); goto ex; } - + role = burn_drive_get_drive_role(drive); + if (role == 5) { + /* libburn will truncate the random-access write-only file + to zero size and change its state */ + burn_disc_erase(drive, fast); + o->fabricated_disc_status= burn_disc_get_status(drive); + o->nwa= 0; + goto ex; + } if(o->emulation_mode > 0) { /* might be readonly with emulated sessions */ ret= burn_disc_get_multi_caps(drive, BURN_WRITE_NONE, &caps, 0); if(ret > 0 && caps->start_adr) diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 2ef5ae0e..a452c8bd 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.03.21.165533" +#define Xorriso_timestamP "2011.03.22.081408"