From: pdmef Date: Mon, 3 Apr 2006 10:57:24 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=2a8949b88182e32a1adf7e61659112477ee7282d Rocco Rutte: - back out last str_dup() change as it breaks IMAP logins (and likely more places where '!s' tests are done but not '!*s') (reported on IRC and by Trey Sizemore ); for the f=f crash, fix f=f handler instead git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@798 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/VERSION.svn b/VERSION.svn index 34eafc3..8832c4d 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -797 +798 diff --git a/lib/str.c b/lib/str.c index 26df4b2..451b898 100644 --- a/lib/str.c +++ b/lib/str.c @@ -21,7 +21,7 @@ char *str_dup (const char *s) char *p; size_t l; - if (!s) return 0; + if (!s || !*s) return NULL; l = str_len (s) + 1; p = (char *) mem_malloc (l); memcpy (p, s, l); diff --git a/rfc3676.c b/rfc3676.c index b1a2e01..f6ca099 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -136,13 +136,15 @@ static void print_flowed_line (char *line, STATE * s, int ql) { int rfc3676_handler (BODY * a, STATE * s) { int bytes = a->length; char buf[LONG_STRING]; - char *curline = str_dup (""); + char *curline = mem_malloc(1); char *t = NULL; unsigned int curline_len = 1, quotelevel = 0, newql = 0; int buf_off, buf_len; int delsp = 0, fixed = 0; + *curline='\0'; + /* respect DelSP of RfC3676 only with f=f parts */ if ((t = (char*) mutt_get_parameter ("delsp", a->parameter))) { delsp = str_len (t) == 3 && ascii_strncasecmp (t, "yes", 3) == 0;