git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@678 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/07/21 00:19:02... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: message.c,v $ |
20 |
+ * Revision 1.66 2004/07/20 15:17:44 nigelhorne |
|
21 |
+ * Remove overlapping strcpy |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.65 2004/07/20 14:35:29 nigelhorne |
21 | 24 |
* Some MYDOOM.I were getting through |
22 | 25 |
* |
... | ... |
@@ -192,7 +195,7 @@ |
192 | 192 |
* uuencodebegin() no longer static |
193 | 193 |
* |
194 | 194 |
*/ |
195 |
-static char const rcsid[] = "$Id: message.c,v 1.65 2004/07/20 14:35:29 nigelhorne Exp $"; |
|
195 |
+static char const rcsid[] = "$Id: message.c,v 1.66 2004/07/20 15:17:44 nigelhorne Exp $"; |
|
196 | 196 |
|
197 | 197 |
#if HAVE_CONFIG_H |
198 | 198 |
#include "clamav-config.h" |
... | ... |
@@ -1651,8 +1654,14 @@ decodeLine(message *m, const char *line, unsigned char *buf, size_t buflen) |
1651 | 1651 |
static void |
1652 | 1652 |
squeeze(char *s) |
1653 | 1653 |
{ |
1654 |
- while((s = strchr(s, ' ')) != NULL) |
|
1655 |
- strcpy(s, &s[1]); |
|
1654 |
+ while((s = strchr(s, ' ')) != NULL) { |
|
1655 |
+ /*strcpy(s, &s[1]);*/ /* overlapping strcpy */ |
|
1656 |
+ |
|
1657 |
+ char *p1; |
|
1658 |
+ |
|
1659 |
+ for(p1 = s; p1[0] != '\0'; p1++) |
|
1660 |
+ p1[0] = p1[1]; |
|
1661 |
+ } |
|
1656 | 1662 |
} |
1657 | 1663 |
|
1658 | 1664 |
/* |