From: <al...@us...> - 2003-04-04 20:14:54
|
Update of /cvsroot/msyslog/syslog/src/modules In directory sc8-pr-cvs1:/tmp/cvs-serv6225/modules Modified Files: om_queue.c om_regex.c Log Message: warn. string mgmt on these modules is complicated. thorough revisions required Index: om_queue.c =================================================================== RCS file: /cvsroot/msyslog/syslog/src/modules/om_queue.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- om_queue.c 4 Apr 2003 17:22:25 -0000 1.7 +++ om_queue.c 4 Apr 2003 20:14:50 -0000 1.8 @@ -147,6 +147,7 @@ *swap2 = '\0'; while( ( new_position = strchr(position, to_encode) ) != 0 ) { +#warning are you sure this is correct ? strncat(swap2, position, new_position - position); strcat(swap2, encoding); position = new_position + 1; Index: om_regex.c =================================================================== RCS file: /cvsroot/msyslog/syslog/src/modules/om_regex.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- om_regex.c 4 Apr 2003 18:38:26 -0000 1.50 +++ om_regex.c 4 Apr 2003 20:14:50 -0000 1.51 @@ -354,6 +354,7 @@ *subexp_no = realloc( *subexp_no, current_bound * sizeof(int) ); } (*non_subst)[current_element] = malloc(pmatch[3].rm_so); +#warning are you sure this is correct ? strncpy((*non_subst)[current_element], start, pmatch[3].rm_so - 1); (*non_subst)[current_element][pmatch[3].rm_so - 1] = '\0'; unbackslash((*non_subst)[current_element]); |