2009-01-10 [colin] 3.7.0cvs27
authorColin Leroy <colin@colino.net>
Sat, 10 Jan 2009 15:18:47 +0000 (15:18 +0000)
committerColin Leroy <colin@colino.net>
Sat, 10 Jan 2009 15:18:47 +0000 (15:18 +0000)
* src/codeconv.c
Fix bug 1811, '[mime] Crash when there's no
room for filename's start on the same line'
Make sure we can at least output one char
to the line, or insert the line break
directly.

ChangeLog
PATCHSETS
configure.ac
src/codeconv.c

index 36a7d2f..fef66eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-10 [colin]     3.7.0cvs27
+
+       * src/codeconv.c
+               Fix bug 1811, '[mime] Crash when there's no 
+               room for filename's start on the same line'
+               Make sure we can at least output one char
+               to the line, or insert the line break 
+               directly.
+
 2009-01-09 [colin]     3.7.0cvs26
 
        * src/compose.c
index 0a674eb..02d5f71 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.115.2.217 -r 1.115.2.218 src/main.c;  ) > 3.7.0cvs24.patchset
 ( cvs diff -u -r 1.26.2.40 -r 1.26.2.41 src/foldersel.c;  ) > 3.7.0cvs25.patchset
 ( cvs diff -u -r 1.382.2.493 -r 1.382.2.494 src/compose.c;  cvs diff -u -r 1.274.2.294 -r 1.274.2.295 src/mainwindow.c;  cvs diff -u -r 1.36.2.162 -r 1.36.2.163 src/common/utils.c;  ) > 3.7.0cvs26.patchset
+( cvs diff -u -r 1.65.2.65 -r 1.65.2.66 src/codeconv.c;  ) > 3.7.0cvs27.patchset
index 640de3c..4f1ebc7 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d98ba68..50bb708 100644 (file)
@@ -1519,6 +1519,16 @@ gchar *conv_unmime_header(const gchar *str, const gchar *default_encoding)
                                *destp++ = ' ';                         \
                                left = MAX_LINELEN - 1;                 \
                        }                                               \
+               } else if (destp == (guchar *)dest && left < 7) {       \
+                       if (isspace(*(destp - 1)))                      \
+                               destp--;                                \
+                       else if (is_plain_text && isspace(*srcp))       \
+                               srcp++;                                 \
+                       if (*srcp) {                                    \
+                               *destp++ = '\n';                        \
+                               *destp++ = ' ';                         \
+                               left = MAX_LINELEN - 1;                 \
+                       }                                               \
                }                                                       \
        }                                                               \
 }