When faced with invalidly uuencoded text, clamscan would just exit.
This isn't quite optimal -- especially when clamscan is scanning the
entire news spool.

The following patch is against the current devel snapshot, and might
not be the optimal patch.  But it fixes the problem for me, at least. 
 
--- message.c~  Sun Sep 14 21:00:00 2003
+++ message.c   Sun Sep 21 14:12:12 2003
@@ -849,20 +849,24 @@
                        break;
 
                case UUENCODE:
-                       assert(*line != '\0');
+                       if (! (*line != '\0')) 
+                         break;
 
                        if(strncasecmp(line, "begin ", 6) == 0)
                                break;
                        if(strcasecmp(line, "end") == 0)
                                break;
 
-                       assert(strlen(line) <= 62);
+                       if (! (strlen(line) <= 62))
+                         break;
+
                        if((line[0] & 0x3F) == ' ')
                                break;
 
                        len = *line++ - ' ';
 
-                       assert((len >= 0) && (len <= 63));
+                       if (! ((len >= 0) && (len <= 63)))
+                         break;
 
                        ptr = decode(line, ptr, uudecode, (len & 3) == 0);
                        break;

 
-- 
(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