diff --git a/xorriso/misc_funct.c b/xorriso/misc_funct.c index 998e6b46..cfb26db6 100644 --- a/xorriso/misc_funct.c +++ b/xorriso/misc_funct.c @@ -1013,19 +1013,22 @@ ex:; /* @param flag bit0= append to out_text rather than overwrite it + bit1= length limit is 10 * SfileadrL rather than 5 * */ char *Text_shellsafe(char *in_text, char *out_text, int flag) { - int l,i,ol= 0,w=0; + int l,i,w=0, limit= 5 * SfileadrL; if(flag&1) - ol= w= strlen(out_text); + w= strlen(out_text); + if(flag & 2) + limit= 10 * SfileadrL; /* enclose everything by hard quotes */ l= strlen(in_text); out_text[w++]= '\''; for(i=0;i5*SfileadrL+ol) + if(w + 7 > limit) goto overflow; /* escape hard quote within the text */ out_text[w++]= '\''; @@ -1034,7 +1037,7 @@ char *Text_shellsafe(char *in_text, char *out_text, int flag) out_text[w++]= '"'; out_text[w++]= '\''; } else { - if(w+3>5*SfileadrL) { + if(w + 3 > limit) { overflow:; strncpy(out_text, "'xorriso: TEXT MUCH TOO LONG ... ",33); break; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 6c0747ee..f1bc784f 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.05.05.163926" +#define Xorriso_timestamP "2011.05.06.120600"