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 36a7d2fb43f37f5d966451bfb5914bcf7389308c..fef66eba565688dddcfeafead521e956c180503e 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 0a674eb2c13ca97c5a67050cb468cfe95feac9c2..02d5f7181f714a69246b9f946e4a2df66a659c3f 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 640de3c619c1489b262cfcc7b4f4929b56fafb37..4f1ebc76266766cce2c1cedfbca83bcda859b107 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 d98ba683787d4830bd8ac5741a18ad2dabf683ce..50bb708d91692bd7afa08a62e47f59a77f244a41 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;                 \
+                       }                                               \
                }                                                       \
        }                                                               \
 }