commit 5c08ed5d4f30f6449160ac4760b02b6b75b91524
parent b934715d7b6e08724827bf5b1d3ac585e0a037b5
Author: Colin Leroy <colin@colino.net>
Date: Tue, 18 Nov 2008 10:29:16 +0000
2008-11-18 [colin] 3.6.1cvs32
* src/procmime.c
* src/common/w32_reg.c
Fix crash on win32 when browsing to a
directory
Diffstat:
5 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-18 [colin] 3.6.1cvs32
+
+ * src/procmime.c
+ * src/common/w32_reg.c
+ Fix crash on win32 when browsing to a
+ directory
+
2008-11-15 [colin] 3.6.1cvs31
* src/compose.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3613,3 +3613,4 @@
( cvs diff -u -r 1.1.2.55 -r 1.1.2.56 src/plugins/pgpcore/sgpgme.c; ) > 3.6.1cvs29.patchset
( cvs diff -u -r 1.382.2.482 -r 1.382.2.483 src/compose.c; ) > 3.6.1cvs30.patchset
( cvs diff -u -r 1.382.2.483 -r 1.382.2.484 src/compose.c; ) > 3.6.1cvs31.patchset
+( cvs diff -u -r 1.49.2.119 -r 1.49.2.120 src/procmime.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/common/w32_reg.c; ) > 3.6.1cvs32.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=6
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=31
+EXTRA_VERSION=32
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/common/w32_reg.c b/src/common/w32_reg.c
@@ -120,6 +120,9 @@ char *get_content_type_from_registry_with_ext( char *ext )
DWORD bufsiz;
char *section, *key, *value;
+ if (ext == NULL)
+ return NULL;
+
// parent : HKEY_CLASSES_ROOT
// section : ".txt"
parent = HKEY_CLASSES_ROOT;
diff --git a/src/procmime.c b/src/procmime.c
@@ -991,6 +991,9 @@ gchar *procmime_get_mime_type(const gchar *filename)
}
#endif
+ if (filename == NULL)
+ return NULL;
+
base = g_path_get_basename(filename);
if ((p = strrchr(base, '.')) != NULL)
ext = g_utf8_strdown(p + 1, -1);