[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa
Stephen Gran
steve at lobefin.net
Thu Sep 4 12:36:52 UTC 2008
The following commit has been merged in the debian/unstable branch:
commit bcbb17fc92d17bad30eb170915f5bf2cca82f1aa
Author: Stephen Gran <steve at lobefin.net>
Date: Thu Sep 4 13:25:31 2008 +0100
Revert "merge r3842 from trunk for bb #947."
This reverts commit 67cc6eeed3fbb3fe8bbe4a9ba1dbf07565174152.
diff --git a/ChangeLog b/ChangeLog
index cee6fd9..162c430 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,3 @@
-Fri May 9 13:58:27 EEST 2008 (edwin)
--------------------------------------
- * libclamav/regex: avoid name collisions on AIX (bb #947)
- sync with libc: minor cleanups
-
Mon May 5 15:32:42 CEST 2008 (tk)
----------------------------------
* doc/clamdoc.tex: add a note about forking daemons (bb#906)
diff --git a/libclamav/regex/regcomp.c b/libclamav/regex/regcomp.c
index 9fcdb18..03fadde 100644
--- a/libclamav/regex/regcomp.c
+++ b/libclamav/regex/regcomp.c
@@ -240,7 +240,7 @@ cli_regcomp(regex_t *preg, const char *pattern, int cflags)
preg->re_magic = MAGIC1;
#ifndef REDEBUG
/* not debugging, so can't rely on the assert() in cli_regexec() */
- if (g->iflags®EX_BAD)
+ if (g->iflags&BAD)
SETERROR(REG_ASSERT);
#endif
@@ -1059,8 +1059,8 @@ allocset(struct parse *p)
(void) memset((char *)p->g->setbits + (nbytes - css), 0, css);
}
- /* XXX should not happen */
- if (p->g->sets == NULL || p->g->setbits == NULL)
+
+ if(!p->g->sets || !p->g->setbits)
goto nomem;
cs = &p->g->sets[no];
@@ -1177,7 +1177,10 @@ mcadd( struct parse *p, cset *cs, const char *cp)
void *np;
cs->smultis += strlen(cp) + 1;
- np = cli_realloc(cs->multis, cs->smultis);
+ if (cs->multis == NULL)
+ np = cli_malloc(cs->smultis);
+ else
+ np = cli_realloc(cs->multis, cs->smultis);
if (np == NULL) {
if (cs->multis)
free(cs->multis);
@@ -1420,8 +1423,8 @@ static void
findmust(struct parse *p, struct re_guts *g)
{
sop *scan;
- sop *start; /* start initialized in the default case, after that */
- sop *newstart; /* newstart was initialized in the OCHAR case */
+ sop *start;
+ sop *newstart;
sopno newlen;
sop s;
char *cp;
@@ -1455,7 +1458,7 @@ findmust(struct parse *p, struct re_guts *g)
/* assert() interferes w debug printouts */
if (OP(s) != O_QUEST && OP(s) != O_CH &&
OP(s) != OOR2) {
- g->iflags |= REGEX_BAD;
+ g->iflags |= BAD;
return;
}
} while (OP(s) != O_QUEST && OP(s) != O_CH);
@@ -1520,6 +1523,6 @@ pluscount(struct parse *p, struct re_guts *g)
}
} while (OP(s) != OEND);
if (plusnest != 0)
- g->iflags |= REGEX_BAD;
+ g->iflags |= BAD;
return(maxnest);
}
diff --git a/libclamav/regex/regex2.h b/libclamav/regex/regex2.h
index 5825a62..5fd0d65 100644
--- a/libclamav/regex/regex2.h
+++ b/libclamav/regex/regex2.h
@@ -138,7 +138,7 @@ struct re_guts {
int iflags; /* internal flags */
# define USEBOL 01 /* used ^ */
# define USEEOL 02 /* used $ */
-# define REGEX_BAD 04 /* something wrong */
+# define BAD 04 /* something wrong */
int nbol; /* number of ^ used */
int neol; /* number of $ used */
int ncategories; /* how many character categories */
diff --git a/libclamav/regex/regexec.c b/libclamav/regex/regexec.c
index 8ddad15..46f9f71 100644
--- a/libclamav/regex/regexec.c
+++ b/libclamav/regex/regexec.c
@@ -150,8 +150,8 @@ cli_regexec(const regex_t *preg, const char *string, size_t nmatch,
if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
return(REG_BADPAT);
- assert(!(g->iflags®EX_BAD));
- if (g->iflags®EX_BAD) /* backstop for no-debug case */
+ assert(!(g->iflags&BAD));
+ if (g->iflags&BAD) /* backstop for no-debug case */
return(REG_BADPAT);
eflags = GOODFLAGS(eflags);
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list