From 8da7ffc314a7bb9d6a99fa061846562efd06b185 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 21 Jan 2008 22:21:01 +0000 Subject: [PATCH] Rejected unsuitable addresses "stdio:" , "stdio:/", "stdio:-", "stdio:." --- libisoburn/trunk/test/xorriso.1 | 2 +- libisoburn/trunk/test/xorriso.c | 21 +++++++++++++++------ libisoburn/trunk/test/xorriso_timestamp.h | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/libisoburn/trunk/test/xorriso.1 b/libisoburn/trunk/test/xorriso.1 index 3d0c10a6..022bc6fb 100644 --- a/libisoburn/trunk/test/xorriso.1 +++ b/libisoburn/trunk/test/xorriso.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH XORRISO 1 "January 2, 2008" +.TH XORRISO 1 "January 21, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff --git a/libisoburn/trunk/test/xorriso.c b/libisoburn/trunk/test/xorriso.c index 49ab33b4..d824cc9c 100644 --- a/libisoburn/trunk/test/xorriso.c +++ b/libisoburn/trunk/test/xorriso.c @@ -6597,12 +6597,21 @@ int Xorriso_option_dev(struct XorrisO *xorriso, char *in_adr, int flag) adr= in_adr; if(strcmp(in_adr, "-")==0) adr= "stdio:/dev/fd/1"; - if(xorriso->ban_stdio_write && strncmp(adr, "stdio:", 6)==0) { - sprintf(xorriso->info_text, - "Drive address banned by -ban_stdio_write : '%s'", - adr); - Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); - return(0); + if(strncmp(adr, "stdio:", 6)==0) { + if(strlen(adr)==6 || strcmp(adr, "stdio:/")==0 || + strcmp(adr, "stdio:.")==0 || strcmp(adr, "stdio:..")==0 || + strcmp(adr, "stdio:-")==0) { + sprintf(xorriso->info_text, + "No suitable path given by device address '%s'", adr); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + return(0); + } + if(xorriso->ban_stdio_write) { + sprintf(xorriso->info_text, + "Drive address banned by -ban_stdio_write : '%s'", adr); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + return(0); + } } if(xorriso->volset_change_pending && (flag&1)) { diff --git a/libisoburn/trunk/test/xorriso_timestamp.h b/libisoburn/trunk/test/xorriso_timestamp.h index f29c590d..2292f56e 100644 --- a/libisoburn/trunk/test/xorriso_timestamp.h +++ b/libisoburn/trunk/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.01.20.200254" +#define Xorriso_timestamP "2008.01.21.221939"