Browse code

Handle binary encoding as though it had no encoding

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@419 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/03/20 02:39:47
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Fri Mar 19 17:48:31 GMT 2004 (njh)
2
+----------------------------------
3
+  * libclamav/message.c:	Handle "binary encoding" (whatever that is :-)
4
+  	the same as no encoding
5
+
1 6
 Fri Mar 19 15:50:47 GMT 2004 (njh)
2 7
 ----------------------------------
3 8
   * libclamav/mbox.c:	Handle empty content-disposition headers
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: message.c,v $
20
+ * Revision 1.42  2004/03/19 17:38:11  nigelhorne
21
+ * Handle binary encoding as though it had no encoding
22
+ *
20 23
  * Revision 1.41  2004/03/19 08:08:38  nigelhorne
21 24
  * Handle '8 bit' encoding as well as the RFC '8bit'
22 25
  *
... ...
@@ -120,7 +123,7 @@
120 120
  * uuencodebegin() no longer static
121 121
  *
122 122
  */
123
-static	char	const	rcsid[] = "$Id: message.c,v 1.41 2004/03/19 08:08:38 nigelhorne Exp $";
123
+static	char	const	rcsid[] = "$Id: message.c,v 1.42 2004/03/19 17:38:11 nigelhorne Exp $";
124 124
 
125 125
 #if HAVE_CONFIG_H
126 126
 #include "clamav-config.h"
... ...
@@ -976,7 +979,7 @@ messageToBlob(const message *m)
976 976
 			filename = (char *)messageFindArgument(m, "name");
977 977
 
978 978
 			if(filename == NULL) {
979
-				cli_dbgmsg("Attachment sent with no filename\n");
979
+				cli_warnmsg("Attachment sent with no filename\n");
980 980
 				blobDestroy(b);
981 981
 				return NULL;
982 982
 			}
... ...
@@ -1220,6 +1223,11 @@ decodeLine(const message *m, const char *line, unsigned char *buf, size_t buflen
1220 1220
 	assert(buf != NULL);
1221 1221
 
1222 1222
 	switch(messageGetEncoding(m)) {
1223
+		case BINARY:
1224
+			/*
1225
+			 * TODO: find out what this is, encoded as binary??
1226
+			 */
1227
+			/* fall through */
1223 1228
 		case NOENCODING:
1224 1229
 		case EIGHTBIT:
1225 1230
 		default:	/* unknown encoding type - try our best */
... ...
@@ -1303,12 +1311,6 @@ decodeLine(const message *m, const char *line, unsigned char *buf, size_t buflen
1303 1303
 			else
1304 1304
 				buf = decode(line, buf, uudecode, (len & 3) == 0);
1305 1305
 			break;
1306
-
1307
-		case BINARY:
1308
-			/*
1309
-			 * TODO: find out what this is, encoded as binary??
1310
-			 */
1311
-			break;
1312 1306
 	}
1313 1307
 
1314 1308
 	*buf = '\0';