From 97e3e29c443e015a7e49e94006f2891c9b38de70 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 9 Nov 2015 13:31:59 +0000 Subject: [PATCH] Prevented a SIGSEGV with isoburn_read_image() feature to submit NULL parameter. Coverity CID 28721. --- libisoburn/isofs_wrap.c | 5 ++++- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libisoburn/isofs_wrap.c b/libisoburn/isofs_wrap.c index 9baa1a07..1b093255 100644 --- a/libisoburn/isofs_wrap.c +++ b/libisoburn/isofs_wrap.c @@ -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; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 830f1ac5..5d729eaa 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2015.11.09.121421" +#define Xorriso_timestamP "2015.11.09.133135"