Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail PR/47395: Steffen: mail(1) unnecessarily uses b...
details: https://anonhg.NetBSD.org/src/rev/f425d05c92a9
branches: trunk
changeset: 783691:f425d05c92a9
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 04 01:43:59 2013 +0000
description:
PR/47395: Steffen: mail(1) unnecessarily uses base64 if a CR without a LF is seen
diffstat:
usr.bin/mail/mime_attach.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 8e4806535ec4 -r f425d05c92a9 usr.bin/mail/mime_attach.c
--- a/usr.bin/mail/mime_attach.c Fri Jan 04 01:21:45 2013 +0000
+++ b/usr.bin/mail/mime_attach.c Fri Jan 04 01:43:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mime_attach.c,v 1.14 2012/04/29 23:50:22 christos Exp $ */
+/* $NetBSD: mime_attach.c,v 1.15 2013/01/04 01:43:59 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef __lint__
-__RCSID("$NetBSD: mime_attach.c,v 1.14 2012/04/29 23:50:22 christos Exp $");
+__RCSID("$NetBSD: mime_attach.c,v 1.15 2013/01/04 01:43:59 christos Exp $");
#endif /* not __lint__ */
#include <assert.h>
@@ -236,7 +236,7 @@
while ((c = fgetc(fh)) != EOF) {
curlen++;
- if (c == '\0' || (lastc == '\r' && c != '\n'))
+ if (c == '\0')
return MIME_TRANSFER_BASE64;
if (c > 0x7f) {
@@ -252,7 +252,7 @@
maxlen = curlen;
curlen = 0;
}
- else if ((c < 0x20 && c != '\t') || c == 0x7f)
+ else if ((c < 0x20 && c != '\t') || c == 0x7f || lastc == '\r')
ctrlchar = 1;
lastc = c;
Home |
Main Index |
Thread Index |
Old Index