In messages with parts having a "Content-Type: /; filename=...",
clamscan would exit asserting that the subtype shouldn't be NULL.

This patch defaults the subtype to "octet-stream" instead.

(In general, I'd say that assert()-ing stuff on user input isn't the
most useful choice of actions.)

--- message.c~  Sun Sep 14 21:00:00 2003
+++ message.c   Sun Sep 21 19:22:38 2003
@@ -192,7 +192,9 @@
 messageSetMimeSubtype(message *m, const char *subtype)
 {
        assert(m != NULL);
-       assert(subtype != NULL);
+
+       if(subtype == NULL)
+         subtype = "octet-stream";
 
        if(m->mimeSubtype)
                free(m->mimeSubtype);
@@ -210,7 +212,8 @@
 messageSetDispositionType(message *m, const char *disptype)
 {
        assert(m != NULL);
-       assert(disptype != NULL);
+       if(disptype == NULL)
+         disptype = "attachment";
 
        m->mimeDispositionType = strdup(disptype);
 }

 
-- 
(domestic pets only, the antidote for overdose, milk.)
  [EMAIL PROTECTED] * Lars Magne Ingebrigtsen



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Clamav-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-devel

Reply via email to