From 722be64518f8205d9664b18409cb2419cc6e6529 Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Thu, 15 May 2003 08:41:43 +0000 Subject: [PATCH] sync with latest 0.9.0pre1 --- ChangeLog | 17 +++++++++++++++++ ChangeLog.claws | 5 +++++ ChangeLog.jp | 18 ++++++++++++++++++ INSTALL | 2 +- configure.ac | 2 +- src/addr_compl.c | 3 ++- src/addressbook.c | 2 +- src/compose.c | 3 +-- src/imap.c | 3 +++ src/main.c | 4 ++++ 10 files changed, 53 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3acac661c..4d16c694d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2003-05-15 + + * src/imap.c: + imap_parse_atom() + imap_get_header() + imap_cmd_fetch(): check for data size that servers return (fixes + vulnerability found in BugTraq). + +2003-05-14 + + * src/addr_compl.c: get_complete_address() + src/addressbook.c: addressbook_format_address() + src/compose.c: QUOTE_IF_REQUIRED(): quote if name contains + characters that is not defined in atext (RFC 2822, 3.2.4. Atom). + * src/main.c: main(): set colormap and visual to solve color problem + in Solaris (thanks to Markus Schwarzenberg). + 2003-05-12 * version 0.9.0pre1 diff --git a/ChangeLog.claws b/ChangeLog.claws index 35376ee61..5a6a94509 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2003-05-15 [paul] 0.8.11claws154 + + * sync with latest 0.9.0pre1 + see ChangeLog 2003-05-14 and 2003-05-14 + 2003-05-14 [christoph] 0.8.11claws153 * src/plugins/image_viewer/viewer.c diff --git a/ChangeLog.jp b/ChangeLog.jp index 34458eda4..0e9216bc7 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,21 @@ +2003-05-15 + + * src/imap.c: + imap_parse_atom() + imap_get_header() + imap_cmd_fetch(): ¥µ¡¼¥Ð¤¬ÊÖ¤¹¥Ç¡¼¥¿¥µ¥¤¥º¤ò¥Á¥§¥Ã¥¯(BugTraq ¤Ç + ȯ¸«¤µ¤ì¤¿ÀȼåÀ­¤ò½¤Àµ)¡£ + +2003-05-14 + + * src/addr_compl.c: get_complete_address() + src/addressbook.c: addressbook_format_address() + src/compose.c: QUOTE_IF_REQUIRED(): ̾Á°¤¬ atext (RFC 2822, 3.2.4. + Atom) ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤Ê¸»ú¤ò´Þ¤ó¤Ç¤¤¤ë¾ì¹ç¤Ï°úÍÑÉä¤Ç³ç¤ë¤è¤¦¤Ë + ¤·¤¿¡£ + * src/main.c: main(): Solaris ¤Ë¤ª¤±¤ë¥«¥é¡¼¤ÎÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤Ë + colormap ¤È visual ¤ò¥»¥Ã¥È(Markus Schwarzenberg ¤µ¤ó thanks)¡£ + 2003-05-12 * version 0.9.0pre1 diff --git a/INSTALL b/INSTALL index f0a05de0b..6f400c500 100644 --- a/INSTALL +++ b/INSTALL @@ -126,7 +126,7 @@ Options for configure script ============================ --disable-compface disable compface (X-Face) support - --enable-ssl SSL support (requires OpenSSL) + --enable-openssl SSL support (requires OpenSSL) --enable-ipv6 IPv6 support --enable-gpgme GnuPG support (requires GPGME and GnuPG) --enable-ldap LDAP support diff --git a/configure.ac b/configure.ac index fa5365309..86e26149a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=11 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws153 +EXTRA_VERSION=claws154 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/addr_compl.c b/src/addr_compl.c index e2858f068..f11f4b929 100644 --- a/src/addr_compl.c +++ b/src/addr_compl.c @@ -376,7 +376,8 @@ gchar *get_complete_address(gint index) if (p != NULL) { if (!p->name || p->name[0] == '\0') address = g_strdup_printf(p->address); - else if (strchr_with_skip_quote(p->name, '"', ',')) + else if (p->name[0] != '"' && + strpbrk(p->name, ",.[]<>") != NULL) address = g_strdup_printf ("\"%s\" <%s>", p->name, p->address); else diff --git a/src/addressbook.c b/src/addressbook.c index f528d578f..8d5bdc2c3 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -1116,7 +1116,7 @@ gchar *addressbook_format_address( AddrItemObject * aio ) { } if( address ) { if( name && name[0] != '\0' ) { - if( strchr_with_skip_quote( name, '"', ',' ) ) + if( name[0] != '"' && strpbrk( name, ",.[]<>" ) != NULL ) buf = g_strdup_printf( "\"%s\" <%s>", name, address ); else buf = g_strdup_printf( "%s <%s>", name, address ); diff --git a/src/compose.c b/src/compose.c index 50bc4afbe..d2f40f4ad 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3946,8 +3946,7 @@ static void compose_write_attach(Compose *compose, FILE *fp) #define QUOTE_IF_REQUIRED(out, str) \ { \ - if (*str != '"' && (strchr(str, ',') \ - || strchr(str, '.'))) { \ + if (*str != '"' && strpbrk(str, ",.[]<>")) { \ gchar *__tmp; \ gint len; \ \ diff --git a/src/imap.c b/src/imap.c index c79f52dad..8d7b6c4c6 100644 --- a/src/imap.c +++ b/src/imap.c @@ -1859,6 +1859,7 @@ static gchar *imap_parse_atom(SockInfo *sock, gchar *src, cur_pos = strchr_cpy(cur_pos + 1, '}', buf, sizeof(buf)); len = atoi(buf); + g_return_val_if_fail(len > 0, cur_pos); g_string_truncate(str, 0); cur_pos = str->str; @@ -1901,6 +1902,7 @@ static gchar *imap_get_header(SockInfo *sock, gchar *cur_pos, gchar **headers, cur_pos = strchr_cpy(cur_pos + 1, '}', buf, sizeof(buf)); len = atoi(buf); + g_return_val_if_fail(len > 0, cur_pos); g_string_truncate(str, 0); cur_pos = str->str; @@ -2550,6 +2552,7 @@ static gint imap_cmd_fetch(IMAPSession *session, guint32 uid, const gchar *filen return IMAP_ERROR; } size_num = atol(size_str); + g_return_val_if_fail(size_num > 0, IMAP_ERROR); if (*cur_pos != '\0') { g_free(buf); diff --git a/src/main.c b/src/main.c index 0d54030eb..554a890c7 100644 --- a/src/main.c +++ b/src/main.c @@ -198,6 +198,10 @@ int main(int argc, char *argv[]) gtk_set_locale(); gtk_init(&argc, &argv); + gdk_rgb_init(); + gtk_widget_set_default_colormap(gdk_rgb_get_cmap()); + gtk_widget_set_default_visual(gdk_rgb_get_visual()); + #if USE_THREADS || USE_LDAP g_thread_init(NULL); if (!g_thread_supported()) -- 2.25.1