commit 6ba8411d99280005249beef37dd18d75bbd39473
parent 366ec78abcce623ba8535178d506abbd8322c75d
Author: Colin Leroy <colin@colino.net>
Date: Sat, 10 Jan 2009 15:18:47 +0000
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.
Diffstat:
4 files changed, 21 insertions(+), 1 deletion(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3688,3 +3688,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/codeconv.c b/src/codeconv.c
@@ -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; \
+ } \
} \
} \
}