git-svn: trunk@1493
Tomasz Kojm authored on 2005/04/27 02:39:40... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Tue Apr 26 19:37:24 CEST 2005 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/readdb.c: improve parsing of broken signatures (bug reported by |
|
4 |
+ Arnaud Jacques <arnaud*clamav.net>) |
|
5 |
+ |
|
1 | 6 |
Tue Apr 26 18:59:16 CEST 2005 (tk) |
2 | 7 |
---------------------------------- |
3 | 8 |
* libclamav/scanners.c: improve error detection in zip code |
... | ... |
@@ -116,6 +116,7 @@ static int cli_ac_addsig(struct cl_node *root, const char *virname, const char * |
116 | 116 |
new->altn = (unsigned short int *) realloc(new->altn, new->alt * sizeof(unsigned short int)); |
117 | 117 |
new->altn[new->alt - 1] = 0; |
118 | 118 |
new->altc = (char **) realloc(new->altc, new->alt * sizeof(char *)); |
119 |
+ new->altc[new->alt - 1] = NULL; |
|
119 | 120 |
|
120 | 121 |
for(i = 0; i < strlen(pt); i++) |
121 | 122 |
if(pt[i] == '|') |
... | ... |
@@ -164,7 +165,8 @@ static int cli_ac_addsig(struct cl_node *root, const char *virname, const char * |
164 | 164 |
if(new->alt) { |
165 | 165 |
free(new->altn); |
166 | 166 |
for(i = 0; i < new->alt; i++) |
167 |
- free(new->altc[i]); |
|
167 |
+ if(new->altc[i]) |
|
168 |
+ free(new->altc[i]); |
|
168 | 169 |
free(new->altc); |
169 | 170 |
} |
170 | 171 |
free(new); |