From 9049784c1cfa474897e0c1fb1567bbbd7a144282 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 24 Feb 2011 19:20:17 +0000 Subject: [PATCH] Corrected flaws found by George Danchev with cpp --- xorriso/filters.c | 2 +- xorriso/opts_d_h.c | 2 ++ xorriso/text_io.c | 2 +- xorriso/xorriso_timestamp.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xorriso/filters.c b/xorriso/filters.c index aef1e4a6..fe5da3f0 100644 --- a/xorriso/filters.c +++ b/xorriso/filters.c @@ -398,7 +398,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node, sprintf(xorriso->info_text, "-set_filter: UID and EUID differ. Will not run external programs."); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0); - return(0); + ret= 0; goto ex; } #endif /* ! Xorriso_allow_extf_suiD */ diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index f863b110..f179ce1e 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -399,6 +399,8 @@ int Xorriso_option_errfile_log(struct XorrisO *xorriso, sprintf(xorriso->info_text, "-errfile_log: Unknown mode %s", Text_shellsafe(mode, sfe, 0)); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + if(fp != NULL) + fclose(fp); return(0); } diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 1a6600c7..23c6e989 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -106,7 +106,7 @@ get_single:; l= strlen(cpt); if(l >= linesize - base_length - 1) { strncpy(linept, cpt, linesize - 1); - line[sizeof(line)-1]= 0; + line[linesize - 1]= 0; sprintf(xorriso->info_text,"Input line too long !"); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); goto new_empty; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index b110715e..39ec8383 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.02.24.191908" +#define Xorriso_timestamP "2011.02.24.192029"