[lwatch-cvs] files/src strpcre.c,1.4,1.5
Brought to you by:
arturcz
|
From: <ar...@us...> - 2002-07-01 15:38:27
|
Update of /cvsroot/lwatch/files/src
In directory usw-pr-cvs1:/tmp/cvs-serv13702
Modified Files:
strpcre.c
Log Message:
Bugfix - program crashes when input does not match with fixed rule dividing it into
parts: date, host, service and message.
Index: strpcre.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/strpcre.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** strpcre.c 30 Jun 2002 19:09:35 -0000 1.4
--- strpcre.c 1 Jul 2002 15:38:17 -0000 1.5
***************
*** 130,133 ****
--- 130,137 ----
n=pcre_exec(parser.pre,parser.prh,input,strlen(input),0,0,
(int*)&re_matches,RE_NMATCHES);
+ if(n<0) {
+ printf("%s\n",input);
+ return;
+ }
pcre_get_substring_list(input,(int*)&re_matches,n,&re_str);
for(i=0;i<no_actions;i++) {
|