Corrected 4-byte buffer overflow (which did no detectable harm)

This commit is contained in:
Thomas Schmitt 2007-10-15 11:55:34 +00:00
parent 4f382d8cdf
commit 7833b81678
2 changed files with 6 additions and 2 deletions

View File

@ -2192,8 +2192,11 @@ int Cdrpreskin_set_result_fd(struct CdrpreskiN *o, int result_fd, int flag)
int Cdrpreskin_read_rc(struct CdrpreskiN *o, char *progname, int flag) int Cdrpreskin_read_rc(struct CdrpreskiN *o, char *progname, int flag)
{ {
int ret,i; int ret,i;
char *filenames_v[3]; char **filenames_v;
filenames_v= TSOB_FELD(char *, o->rc_filename_count+1);
if(filenames_v==NULL)
return(-1);
for(i=0;i<o->rc_filename_count;i++) for(i=0;i<o->rc_filename_count;i++)
filenames_v[i]= o->rc_filenames[i]; filenames_v[i]= o->rc_filenames[i];
Sfile_home_adr_s(".cdrskinrc",o->rc_filenames[o->rc_filename_count-1], Sfile_home_adr_s(".cdrskinrc",o->rc_filenames[o->rc_filename_count-1],
@ -2201,6 +2204,7 @@ int Cdrpreskin_read_rc(struct CdrpreskiN *o, char *progname, int flag)
ret= Sfile_multi_read_argv(progname,filenames_v,o->rc_filename_count, ret= Sfile_multi_read_argv(progname,filenames_v,o->rc_filename_count,
&(o->pre_argc),&(o->pre_argv), &(o->pre_argc),&(o->pre_argv),
&(o->pre_argidx),&(o->pre_arglno),4); &(o->pre_argidx),&(o->pre_arglno),4);
free((char *) filenames_v);
return(ret); return(ret);
} }

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.10.07.110506" #define Cdrskin_timestamP "2007.10.15.115448"