Browse code

Scan attachments that have no filename

git-svn: trunk@1739

Nigel Horne authored on 2005/11/01 06:22:22
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Oct 31 21:21:38 GMT 2005 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Scan attachments that have no filename
4
+
1 5
 Sun Oct 30 21:22:35 CET 2005 (tk)
2 6
 ---------------------------------
3 7
   * clamd/others.c: fix compilation error on Cobalt Qube 1
... ...
@@ -15,7 +15,7 @@
15 15
  *  along with this program; if not, write to the Free Software
16 16
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.260 2005/09/30 14:58:37 nigelhorne Exp $";
18
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.261 2005/10/31 21:21:13 nigelhorne Exp $";
19 19
 
20 20
 #if HAVE_CONFIG_H
21 21
 #include "clamav-config.h"
... ...
@@ -3092,6 +3092,17 @@ parseMimeHeader(message *m, const char *cmd, const table_t *rfc821Table, const c
3092 3092
 				}
3093 3093
 				free(p);
3094 3094
 			}
3095
+			if((p = (char *)messageFindArgument(m, "filename")) == NULL)
3096
+				/*
3097
+				 * Handle this type of header, without
3098
+				 * a filename (e.g. some Worm.Torvil.D)
3099
+				 *	Content-ID: <nRfkHdrKsAxRU>
3100
+				 * Content-Transfer-Encoding: base64
3101
+				 * Content-Disposition: attachment
3102
+				 */
3103
+				messageAddArgument(m, "filename=unknown");
3104
+			else
3105
+				free(p);
3095 3106
 	}
3096 3107
 	if(copy)
3097 3108
 		free(copy);