Prevented a SIGSEGV with isoburn_read_image() feature to submit NULL parameter. Coverity CID 28721.

This commit is contained in:
Thomas Schmitt 2015-11-09 13:31:59 +00:00
parent f7f98d9d83
commit 97e3e29c44
2 changed files with 5 additions and 2 deletions

View File

@ -151,6 +151,7 @@ int isoburn_read_image(struct burn_drive *d,
enum burn_disc_status status= BURN_DISC_BLANK;
IsoDataSource *ds= NULL;
struct isoburn *o= NULL;
IsoImage *new_image= NULL;
msg= calloc(1, 160);
@ -189,6 +190,7 @@ create_blank_image:;
}
iso_image_set_ignore_aclea(*image,
(!!(read_opts->noacl)) | ((!!read_opts->noea) << 1) );
new_image= *image;
} else {
/* Blank new image for the drive */
iso_image_unref(o->image);
@ -207,8 +209,9 @@ create_blank_image:;
ret= isoburn_root_defaults(o->image, 0);
if(ret <= 0)
goto ex;
new_image= o->image;
}
ret= iso_image_set_truncate_mode(*image, read_opts->truncate_mode,
ret= iso_image_set_truncate_mode(new_image, read_opts->truncate_mode,
read_opts->truncate_length);
if(ret < 0)
goto ex;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.09.121421"
#define Xorriso_timestamP "2015.11.09.133135"