Fix handling of escaped characters

git-svn: trunk@2305
remotes/push_mirror/metadata
Nigel Horne 19 years ago
parent 5cf8cf16e4
commit 2e7c0aa161
  1. 4
      clamav-devel/ChangeLog
  2. 9
      clamav-devel/libclamav/regex_list.c

@ -1,3 +1,7 @@
Mon Sep 25 19:28:02 BST 2006 (njh)
----------------------------------
* libclamav/regex_list.c: Corrected "R" regex handler
Sun Sep 24 21:24:07 CEST 2006 (acab)
------------------------------------
* libclamav/regex_list.c: fixes for type "R" regex handler

@ -19,6 +19,9 @@
* MA 02110-1301, USA.
*
* $Log: regex_list.c,v $
* Revision 1.4 2006/09/25 18:27:00 njh
* Fix handling of escaped characters
*
* Revision 1.3 2006/09/24 19:28:03 acab
* fixes for type "R" regex handler
*
@ -751,14 +754,16 @@ static const unsigned char* getNextToken(const unsigned char* pat,struct token_t
token->u.start = ++pat;
if(islower(*token->u.start)) {
/* handle \n, \t, etc. */
char fmt[3] = {'\\',*token->u.start,'\0'};
char fmt[3] = {'\\', '\0', '\0'};
char c;
fmt[1] = *token->u.start;
if(snprintf(&c,1,fmt)!=1)
token->type=TOKEN_REGEX;
else
*token->u.start=c;
}
token->len = 1;
token->len = 1;
break;
case '|':
token->type=TOKEN_ALT;

Loading…
Cancel
Save