git-svn: trunk@3738
Török Edvin authored on 2008/03/25 04:19:40... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Mon Mar 24 20:30:34 EET 2008 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/mbox.c, message.c: cli_warnmsg -> cli_dbgmsg (bb #880), |
|
4 |
+ don't handle multipart/encrypted specially |
|
5 |
+ |
|
1 | 6 |
Mon Mar 24 19:31:10 CET 2008 (acab) |
2 | 7 |
----------------------------------- |
3 | 8 |
* libclamav/nsis: a cleaner approach to bb#844 and bb#888 |
... | ... |
@@ -464,7 +464,7 @@ cli_mbox(const char *dir, int desc, cli_ctx *ctx) |
464 | 464 |
struct scanlist *scanlist, *scanelem; |
465 | 465 |
|
466 | 466 |
if(dir == NULL) { |
467 |
- cli_warnmsg("cli_mbox called with NULL dir\n"); |
|
467 |
+ cli_dbgmsg("cli_mbox called with NULL dir\n"); |
|
468 | 468 |
return CL_ENULLARG; |
469 | 469 |
} |
470 | 470 |
if(fstat(desc, &statb) < 0) |
... | ... |
@@ -634,9 +634,9 @@ cli_mbox(const char *dir, int desc, cli_ctx *ctx) |
634 | 634 |
/* TODO: reduce the number of falls through here */ |
635 | 635 |
if(hasuuencode) |
636 | 636 |
/* TODO: fast track visa */ |
637 |
- cli_warnmsg("New world - fall back to old uudecoder\n"); |
|
637 |
+ cli_dbgmsg("New world - fall back to old uudecoder\n"); |
|
638 | 638 |
else |
639 |
- cli_warnmsg("cli_mbox: unknown encoder, type %d\n", type); |
|
639 |
+ cli_dbgmsg("cli_mbox: unknown encoder, type %d\n", type); |
|
640 | 640 |
if(type == CL_TYPE_MAIL) |
641 | 641 |
return cli_parse_mbox(dir, desc, ctx); |
642 | 642 |
cli_dbgmsg("Unknown filetype %d, return CLEAN\n", type); |
... | ... |
@@ -1004,7 +1004,7 @@ cli_mbox(const char *dir, int desc, cli_ctx *ctx) |
1004 | 1004 |
if(ret != CL_EFORMAT) |
1005 | 1005 |
return ret; |
1006 | 1006 |
|
1007 |
- cli_warnmsg("New world - don't know what to do - fall back to old world\n"); |
|
1007 |
+ cli_dbgmsg("New world - don't know what to do - fall back to old world\n"); |
|
1008 | 1008 |
/* Fall back for now */ |
1009 | 1009 |
lseek(desc, 0L, SEEK_SET); |
1010 | 1010 |
return cli_parse_mbox(dir, desc, ctx); |
... | ... |
@@ -1096,7 +1096,7 @@ create_map(const char *begin, const char *end) |
1096 | 1096 |
}; |
1097 | 1097 |
|
1098 | 1098 |
if(map) { |
1099 |
- cli_warnmsg("create_map called without free_map\n"); |
|
1099 |
+ cli_dbgmsg("create_map called without free_map\n"); |
|
1100 | 1100 |
free_map(); |
1101 | 1101 |
} |
1102 | 1102 |
while(begin < end) { |
... | ... |
@@ -1159,7 +1159,7 @@ int |
1159 | 1159 |
cli_mbox(const char *dir, int desc, cli_ctx *ctx) |
1160 | 1160 |
{ |
1161 | 1161 |
if(dir == NULL) { |
1162 |
- cli_warnmsg("cli_mbox called with NULL dir\n"); |
|
1162 |
+ cli_dbgmsg("cli_mbox called with NULL dir\n"); |
|
1163 | 1163 |
return CL_ENULLARG; |
1164 | 1164 |
} |
1165 | 1165 |
return cli_parse_mbox(dir, desc, ctx); |
... | ... |
@@ -2017,7 +2017,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2017 | 2017 |
*/ |
2018 | 2018 |
if(recursion_level > limits->maxreclevel) { |
2019 | 2019 |
|
2020 |
- cli_warnmsg("parseEmailBody: hit maximum recursion level (%u)\n", recursion_level); |
|
2020 |
+ cli_dbgmsg("parseEmailBody: hit maximum recursion level (%u)\n", recursion_level); |
|
2021 | 2021 |
return MAXREC; |
2022 | 2022 |
} |
2023 | 2023 |
if(limits->maxfiles && (mctx->files >= limits->maxfiles)) { |
... | ... |
@@ -2037,7 +2037,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2037 | 2037 |
mime_type mimeType; |
2038 | 2038 |
int subtype, inhead, htmltextPart, inMimeHead, i; |
2039 | 2039 |
const char *mimeSubtype; |
2040 |
- char *protocol, *boundary; |
|
2040 |
+ char *boundary; |
|
2041 | 2041 |
const text *t_line; |
2042 | 2042 |
/*bool isAlternative;*/ |
2043 | 2043 |
message *aMessage; |
... | ... |
@@ -2119,7 +2119,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2119 | 2119 |
|
2120 | 2120 |
/* Perhaps it should assume mixed? */ |
2121 | 2121 |
if(mimeSubtype[0] == '\0') { |
2122 |
- cli_warnmsg("Multipart has no subtype assuming alternative\n"); |
|
2122 |
+ cli_dbgmsg("Multipart has no subtype assuming alternative\n"); |
|
2123 | 2123 |
mimeSubtype = "alternative"; |
2124 | 2124 |
messageSetMimeSubtype(mainMessage, "alternative"); |
2125 | 2125 |
} |
... | ... |
@@ -2130,7 +2130,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2130 | 2130 |
t_line = messageGetBody(mainMessage); |
2131 | 2131 |
|
2132 | 2132 |
if(t_line == NULL) { |
2133 |
- cli_warnmsg("Multipart MIME message has no body\n"); |
|
2133 |
+ cli_dbgmsg("Multipart MIME message has no body\n"); |
|
2134 | 2134 |
free((char *)boundary); |
2135 | 2135 |
mimeType = NOMIME; |
2136 | 2136 |
break; |
... | ... |
@@ -2645,6 +2645,9 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2645 | 2645 |
* parameters, but there's no need for us to |
2646 | 2646 |
* verify that they exist |
2647 | 2647 |
*/ |
2648 |
+ case ENCRYPTED: |
|
2649 |
+ /* MUAs without encryption plugins can display as multipart/mixed, |
|
2650 |
+ * just scan it*/ |
|
2648 | 2651 |
case MIXED: |
2649 | 2652 |
case APPLEDOUBLE: /* not really supported */ |
2650 | 2653 |
/* |
... | ... |
@@ -2692,21 +2695,6 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2692 | 2692 |
|
2693 | 2693 |
rc = parseEmailBody(messages[htmltextPart], aText, mctx, recursion_level + 1); |
2694 | 2694 |
break; |
2695 |
- case ENCRYPTED: |
|
2696 |
- rc = FAIL; /* Not yet handled */ |
|
2697 |
- protocol = (char *)messageFindArgument(mainMessage, "protocol"); |
|
2698 |
- if(protocol) { |
|
2699 |
- if(strcasecmp(protocol, "application/pgp-encrypted") == 0) { |
|
2700 |
- /* RFC2015 */ |
|
2701 |
- cli_warnmsg("PGP encoded attachment not scanned\n"); |
|
2702 |
- rc = OK_ATTACHMENTS_NOT_SAVED; |
|
2703 |
- } else |
|
2704 |
- cli_warnmsg("Unknown encryption protocol '%s' - if you believe this file contains a virus, submit it to www.clamav.net\n", protocol); |
|
2705 |
- free(protocol); |
|
2706 |
- } else |
|
2707 |
- cli_dbgmsg("Encryption method missing protocol name\n"); |
|
2708 |
- |
|
2709 |
- break; |
|
2710 | 2695 |
default: |
2711 | 2696 |
assert(0); |
2712 | 2697 |
} |
... | ... |
@@ -2747,7 +2735,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2747 | 2747 |
case BINARY: |
2748 | 2748 |
break; |
2749 | 2749 |
default: |
2750 |
- cli_warnmsg("MIME type 'message' cannot be decoded\n"); |
|
2750 |
+ cli_dbgmsg("MIME type 'message' cannot be decoded\n"); |
|
2751 | 2751 |
break; |
2752 | 2752 |
} |
2753 | 2753 |
rc = FAIL; |
... | ... |
@@ -2796,7 +2784,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2796 | 2796 |
return rc; |
2797 | 2797 |
|
2798 | 2798 |
default: |
2799 |
- cli_warnmsg("Message received with unknown mime encoding - assume application"); |
|
2799 |
+ cli_dbgmsg("Message received with unknown mime encoding - assume application"); |
|
2800 | 2800 |
/* |
2801 | 2801 |
* Some Yahoo emails attach as |
2802 | 2802 |
* Content-Type: X-unknown/unknown; |
... | ... |
@@ -3368,7 +3356,7 @@ parseMimeHeader(message *m, const char *cmd, const table_t *rfc821Table, const c |
3368 | 3368 |
* for the subtype because virus writers and |
3369 | 3369 |
* email client writers don't get it right |
3370 | 3370 |
*/ |
3371 |
- cli_warnmsg("Empty content-type received, no subtype specified, assuming text/plain; charset=us-ascii\n"); |
|
3371 |
+ cli_dbgmsg("Empty content-type received, no subtype specified, assuming text/plain; charset=us-ascii\n"); |
|
3372 | 3372 |
else if(strchr(ptr, '/') == NULL) |
3373 | 3373 |
/* |
3374 | 3374 |
* Empty field, such as |
... | ... |
@@ -3391,7 +3379,7 @@ parseMimeHeader(message *m, const char *cmd, const table_t *rfc821Table, const c |
3391 | 3391 |
* put white space after the ; |
3392 | 3392 |
*/ |
3393 | 3393 |
if(*arg == '/') { |
3394 |
- cli_warnmsg("Content-type '/' received, assuming application/octet-stream\n"); |
|
3394 |
+ cli_dbgmsg("Content-type '/' received, assuming application/octet-stream\n"); |
|
3395 | 3395 |
messageSetMimeType(m, "application"); |
3396 | 3396 |
messageSetMimeSubtype(m, "octet-stream"); |
3397 | 3397 |
} else { |
... | ... |
@@ -3803,7 +3791,7 @@ rfc1341(message *m, const char *dir) |
3803 | 3803 |
} |
3804 | 3804 |
|
3805 | 3805 |
if(oldfilename) { |
3806 |
- cli_warnmsg("Must reset to %s\n", oldfilename); |
|
3806 |
+ cli_dbgmsg("Must reset to %s\n", oldfilename); |
|
3807 | 3807 |
free(oldfilename); |
3808 | 3808 |
} |
3809 | 3809 |
|
... | ... |
@@ -3887,7 +3875,7 @@ rfc1341(message *m, const char *dir) |
3887 | 3887 |
continue; |
3888 | 3888 |
if(now - statb.st_mtime > (time_t)(7 * 24 * 3600)) |
3889 | 3889 |
if(unlink(fullname) >= 0) |
3890 |
- cli_warnmsg("removed old RFC1341 file %s\n", fullname); |
|
3890 |
+ cli_dbgmsg("removed old RFC1341 file %s\n", fullname); |
|
3891 | 3891 |
continue; |
3892 | 3892 |
} |
3893 | 3893 |
|
... | ... |
@@ -4101,10 +4089,10 @@ do_checkURLs(mbox_ctx *mctx, tag_arguments_t *hrefs) |
4101 | 4101 |
* What about foreign character spoofing? |
4102 | 4102 |
*/ |
4103 | 4103 |
if(strchr(url, '%') && strchr(url, '@')) |
4104 |
- cli_warnmsg("Possible URL spoofing attempt noticed, but not blocked (%s)\n", url); |
|
4104 |
+ cli_dbgmsg("Possible URL spoofing attempt noticed, but not blocked (%s)\n", url); |
|
4105 | 4105 |
|
4106 | 4106 |
if(n == FOLLOWURLS) { |
4107 |
- cli_warnmsg("URL %s will not be scanned (FOLLOWURLS limit %d was reached)\n", |
|
4107 |
+ cli_dbgmsg("URL %s will not be scanned (FOLLOWURLS limit %d was reached)\n", |
|
4108 | 4108 |
url, FOLLOWURLS); |
4109 | 4109 |
break; |
4110 | 4110 |
} |
... | ... |
@@ -4280,7 +4268,7 @@ getURL(struct arg *arg) |
4280 | 4280 |
cli_dbgmsg("Getting %s\n", url); |
4281 | 4281 |
|
4282 | 4282 |
if(strncasecmp(url, "http://", 7) != 0) { |
4283 |
- cli_warnmsg("Unsupported protocol\n"); |
|
4283 |
+ cli_dbgmsg("Unsupported protocol\n"); |
|
4284 | 4284 |
fclose(fp); |
4285 | 4285 |
return NULL; |
4286 | 4286 |
} |
... | ... |
@@ -4430,7 +4418,7 @@ getURL(struct arg *arg) |
4430 | 4430 |
end++; |
4431 | 4431 |
*end = '\0'; |
4432 | 4432 |
if(arg->depth >= FOLLOWURLS) { |
4433 |
- cli_warnmsg("URL %s will not be followed to %s (FOLLOWURLS limit %d was reached)\n", |
|
4433 |
+ cli_dbgmsg("URL %s will not be followed to %s (FOLLOWURLS limit %d was reached)\n", |
|
4434 | 4434 |
arg->url, location, FOLLOWURLS); |
4435 | 4435 |
break; |
4436 | 4436 |
} |
... | ... |
@@ -4566,9 +4554,9 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4566 | 4566 |
flags = fcntl(sock, F_GETFL, 0); |
4567 | 4567 |
|
4568 | 4568 |
if(flags == -1L) |
4569 |
- cli_warnmsg("getfl: %s\n", strerror(errno)); |
|
4569 |
+ cli_dbgmsg("getfl: %s\n", strerror(errno)); |
|
4570 | 4570 |
else if(fcntl(sock, F_SETFL, (long)(flags | O_NONBLOCK)) < 0) |
4571 |
- cli_warnmsg("setfl: %s\n", strerror(errno)); |
|
4571 |
+ cli_dbgmsg("setfl: %s\n", strerror(errno)); |
|
4572 | 4572 |
#else |
4573 | 4573 |
flags = -1L; |
4574 | 4574 |
#endif |
... | ... |
@@ -4582,12 +4570,12 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4582 | 4582 |
case EISCONN: |
4583 | 4583 |
return 0; /* connected */ |
4584 | 4584 |
default: |
4585 |
- cli_warnmsg("%s: connect: %s\n", |
|
4585 |
+ cli_dbgmsg("%s: connect: %s\n", |
|
4586 | 4586 |
hostname, strerror(errno)); |
4587 | 4587 |
#ifdef F_SETFL |
4588 | 4588 |
if(flags != -1L) |
4589 | 4589 |
if(fcntl(sock, F_SETFL, flags)) |
4590 |
- cli_warnmsg("f_setfl: %s\n", strerror(errno)); |
|
4590 |
+ cli_dbgmsg("f_setfl: %s\n", strerror(errno)); |
|
4591 | 4591 |
#endif |
4592 | 4592 |
return -1; /* failed */ |
4593 | 4593 |
} |
... | ... |
@@ -4595,7 +4583,7 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4595 | 4595 |
#ifdef F_SETFL |
4596 | 4596 |
if(flags != -1L) |
4597 | 4597 |
if(fcntl(sock, F_SETFL, flags)) |
4598 |
- cli_warnmsg("f_setfl: %s\n", strerror(errno)); |
|
4598 |
+ cli_dbgmsg("f_setfl: %s\n", strerror(errno)); |
|
4599 | 4599 |
#endif |
4600 | 4600 |
return connect_error(sock, hostname); |
4601 | 4601 |
} |
... | ... |
@@ -4617,7 +4605,7 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4617 | 4617 |
(now.tv_sec > timeout.tv_sec); |
4618 | 4618 |
|
4619 | 4619 |
if(t) { |
4620 |
- cli_warnmsg("%s: connect timeout (%d secs)\n", |
|
4620 |
+ cli_dbgmsg("%s: connect timeout (%d secs)\n", |
|
4621 | 4621 |
hostname, CONNECT_TIMEOUT); |
4622 | 4622 |
break; |
4623 | 4623 |
} |
... | ... |
@@ -4636,7 +4624,7 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4636 | 4636 |
|
4637 | 4637 |
n = select(numfd, 0, &fds, 0, &waittime); |
4638 | 4638 |
if(n < 0) { |
4639 |
- cli_warnmsg("%s: select attempt %d %s\n", |
|
4639 |
+ cli_dbgmsg("%s: select attempt %d %s\n", |
|
4640 | 4640 |
hostname, select_failures, strerror(errno)); |
4641 | 4641 |
if(--select_failures >= 0) |
4642 | 4642 |
continue; /* not timed-out, try again */ |
... | ... |
@@ -4649,14 +4637,14 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4649 | 4649 |
#ifdef F_SETFL |
4650 | 4650 |
if(flags != -1L) |
4651 | 4651 |
if(fcntl(sock, F_SETFL, flags)) |
4652 |
- cli_warnmsg("f_setfl: %s\n", strerror(errno)); |
|
4652 |
+ cli_dbgmsg("f_setfl: %s\n", strerror(errno)); |
|
4653 | 4653 |
#endif |
4654 | 4654 |
return connect_error(sock, hostname); |
4655 | 4655 |
} |
4656 | 4656 |
|
4657 | 4657 |
/* timeout */ |
4658 | 4658 |
if(attempts++ == NONBLOCK_MAX_ATTEMPTS) { |
4659 |
- cli_warnmsg("timeout connecting to %s\n", hostname); |
|
4659 |
+ cli_dbgmsg("timeout connecting to %s\n", hostname); |
|
4660 | 4660 |
break; |
4661 | 4661 |
} |
4662 | 4662 |
} |
... | ... |
@@ -4664,7 +4652,7 @@ nonblock_connect(SOCKET sock, const struct sockaddr_in *sin, const char *hostnam |
4664 | 4664 |
#ifdef F_SETFL |
4665 | 4665 |
if(flags != -1L) |
4666 | 4666 |
if(fcntl(sock, F_SETFL, flags)) |
4667 |
- cli_warnmsg("f_setfl: %s\n", strerror(errno)); |
|
4667 |
+ cli_dbgmsg("f_setfl: %s\n", strerror(errno)); |
|
4668 | 4668 |
#endif |
4669 | 4669 |
return -1; /* failed */ |
4670 | 4670 |
} |
... | ... |
@@ -4679,7 +4667,7 @@ connect_error(SOCKET sock, const char *hostname) |
4679 | 4679 |
getsockopt(sock, SOL_SOCKET, SO_ERROR, &optval, &optlen); |
4680 | 4680 |
|
4681 | 4681 |
if(optval) { |
4682 |
- cli_warnmsg("%s: %s\n", hostname, strerror(optval)); |
|
4682 |
+ cli_dbgmsg("%s: %s\n", hostname, strerror(optval)); |
|
4683 | 4683 |
return -1; |
4684 | 4684 |
} |
4685 | 4685 |
#endif |
... | ... |
@@ -4802,7 +4790,7 @@ getline_from_mbox(char *buffer, size_t len, FILE *fin) |
4802 | 4802 |
|
4803 | 4803 |
if(len == 0) { |
4804 | 4804 |
/* the email probably breaks RFC821 */ |
4805 |
- cli_warnmsg("getline_from_mbox: buffer overflow stopped, line lost\n"); |
|
4805 |
+ cli_dbgmsg("getline_from_mbox: buffer overflow stopped, line lost\n"); |
|
4806 | 4806 |
return NULL; |
4807 | 4807 |
} |
4808 | 4808 |
*buffer = '\0'; |
... | ... |
@@ -5153,7 +5141,7 @@ do_multipart(message *mainMessage, message **messages, int i, mbox_status *rc, m |
5153 | 5153 |
} |
5154 | 5154 |
return mainMessage; |
5155 | 5155 |
default: |
5156 |
- cli_warnmsg("Only text and application attachments are fully supported, type = %d\n", |
|
5156 |
+ cli_dbgmsg("Only text and application attachments are fully supported, type = %d\n", |
|
5157 | 5157 |
messageGetMimeType(aMessage)); |
5158 | 5158 |
/* fall through - we may be able to salvage something */ |
5159 | 5159 |
} |
... | ... |
@@ -223,7 +223,7 @@ messageSetMimeType(message *mess, const char *type) |
223 | 223 |
|
224 | 224 |
assert(mess != NULL); |
225 | 225 |
if(type == NULL) { |
226 |
- cli_warnmsg("Empty content-type field\n"); |
|
226 |
+ cli_dbgmsg("Empty content-type field\n"); |
|
227 | 227 |
return 0; |
228 | 228 |
} |
229 | 229 |
|
... | ... |
@@ -438,11 +438,11 @@ messageAddArgument(message *m, const char *arg) |
438 | 438 |
* FIXME: Bounce message handling is corrupting the in |
439 | 439 |
* core copies of headers |
440 | 440 |
*/ |
441 |
- cli_warnmsg("Possible data corruption fixed\n"); |
|
441 |
+ cli_dbgmsg("Possible data corruption fixed\n"); |
|
442 | 442 |
p[8] = '='; |
443 | 443 |
} else { |
444 | 444 |
if(p && *p) |
445 |
- cli_warnmsg("messageAddArgument, '%s' contains no '='\n", p); |
|
445 |
+ cli_dbgmsg("messageAddArgument, '%s' contains no '='\n", p); |
|
446 | 446 |
free(m->mimeArguments[offset]); |
447 | 447 |
m->mimeArguments[offset] = NULL; |
448 | 448 |
return; |
... | ... |
@@ -662,7 +662,7 @@ messageFindArgument(const message *m, const char *variable) |
662 | 662 |
while(isspace(*ptr)) |
663 | 663 |
ptr++; |
664 | 664 |
if(*ptr != '=') { |
665 |
- cli_warnmsg("messageFindArgument: no '=' sign found in MIME header '%s' (%s)\n", variable, messageGetArgument(m, i)); |
|
665 |
+ cli_dbgmsg("messageFindArgument: no '=' sign found in MIME header '%s' (%s)\n", variable, messageGetArgument(m, i)); |
|
666 | 666 |
return NULL; |
667 | 667 |
} |
668 | 668 |
if((*++ptr == '"') && (strchr(&ptr[1], '"') != NULL)) { |
... | ... |
@@ -733,7 +733,7 @@ messageHasArgument(const message *m, const char *variable) |
733 | 733 |
while(isspace(*ptr)) |
734 | 734 |
ptr++; |
735 | 735 |
if(*ptr != '=') { |
736 |
- cli_warnmsg("messageHasArgument: no '=' sign found in MIME header '%s' (%s)\n", variable, messageGetArgument(m, i)); |
|
736 |
+ cli_dbgmsg("messageHasArgument: no '=' sign found in MIME header '%s' (%s)\n", variable, messageGetArgument(m, i)); |
|
737 | 737 |
return 0; |
738 | 738 |
} |
739 | 739 |
return 1; |
... | ... |
@@ -1278,7 +1278,7 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1278 | 1278 |
continue; |
1279 | 1279 |
|
1280 | 1280 |
if((c < 0x20) || (c > 0x7f) || (hqxtbl[c] == 0xff)) { |
1281 |
- cli_warnmsg("Invalid HQX7 character '%c' (0x%02x)\n", c, c); |
|
1281 |
+ cli_dbgmsg("Invalid HQX7 character '%c' (0x%02x)\n", c, c); |
|
1282 | 1282 |
break; |
1283 | 1283 |
} |
1284 | 1284 |
c = hqxtbl[c]; |
... | ... |
@@ -1377,7 +1377,7 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1377 | 1377 |
len); |
1378 | 1378 |
} |
1379 | 1379 |
if(len == 0) { |
1380 |
- cli_warnmsg("Discarding empty binHex attachment\n"); |
|
1380 |
+ cli_dbgmsg("Discarding empty binHex attachment\n"); |
|
1381 | 1381 |
(*destroy)(ret); |
1382 | 1382 |
blobDestroy(tmp); |
1383 | 1383 |
return NULL; |
... | ... |
@@ -1447,7 +1447,7 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1447 | 1447 |
l = blobGetDataSize(tmp) - byte; |
1448 | 1448 |
|
1449 | 1449 |
if(l < dataforklen) { |
1450 |
- cli_warnmsg("Corrupt BinHex file, claims it is %lu bytes long in a message of %lu bytes\n", |
|
1450 |
+ cli_dbgmsg("Corrupt BinHex file, claims it is %lu bytes long in a message of %lu bytes\n", |
|
1451 | 1451 |
dataforklen, l); |
1452 | 1452 |
dataforklen = l; |
1453 | 1453 |
} |
... | ... |
@@ -1600,7 +1600,7 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1600 | 1600 |
* message |
1601 | 1601 |
*/ |
1602 | 1602 |
if(t_line == NULL) { |
1603 |
- cli_warnmsg("Empty attachment not saved\n"); |
|
1603 |
+ cli_dbgmsg("Empty attachment not saved\n"); |
|
1604 | 1604 |
(*destroy)(ret); |
1605 | 1605 |
return NULL; |
1606 | 1606 |
} |
... | ... |
@@ -2175,7 +2175,7 @@ decodeLine(message *m, encoding_type et, const char *line, unsigned char *buf, s |
2175 | 2175 |
* the maximum length of a uuencoded line is |
2176 | 2176 |
* 62 characters |
2177 | 2177 |
*/ |
2178 |
- cli_warnmsg("uudecode: buffer overflow stopped, attempting to ignore but decoding may fail\n"); |
|
2178 |
+ cli_dbgmsg("uudecode: buffer overflow stopped, attempting to ignore but decoding may fail\n"); |
|
2179 | 2179 |
else { |
2180 | 2180 |
(void)decode(m, line, buf, uudecode, (len & 3) == 0); |
2181 | 2181 |
buf = &buf[reallen]; |
... | ... |
@@ -2668,7 +2668,7 @@ rfc2231(const char *in) |
2668 | 2668 |
|
2669 | 2669 |
if(field != CONTENTS) { |
2670 | 2670 |
free(ret); |
2671 |
- cli_warnmsg("Invalid RFC2231 header: '%s'\n", in); |
|
2671 |
+ cli_dbgmsg("Invalid RFC2231 header: '%s'\n", in); |
|
2672 | 2672 |
return cli_strdup(""); |
2673 | 2673 |
} |
2674 | 2674 |
|