diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-04-23 01:37:38 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-04-23 01:37:38 +0000 |
commit | 82a29ab2e9247bf5efaa1d3f3027b3b4ce51f6c6 (patch) | |
tree | 9be58a6356bd56e4f35e7eefff40196c3101ef2f | |
parent | 975ef7004497df84c6ae0df52ab4e71cd525e160 (diff) |
fixed crash on Win32 when an OpenSSL DLL linked with MSVCR71.DLL was used.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1664 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.ja | 8 | ||||
-rw-r--r-- | libsylph/ssl.c | 6 | ||||
-rw-r--r-- | src/sslmanager.c | 8 |
4 files changed, 23 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2007-04-23 + + * libsylph/ssl.c + src/sslmanager.c: use OPENSSL_free() instead of g_free() for + strings allocated by OpenSSL (fixes crash on Win32 when an OpenSSL + DLL linked with MSVCR71.DLL was used. Thanks to Akihiro Okamura). + 2007-04-20 * version 2.4.0 diff --git a/ChangeLog.ja b/ChangeLog.ja index aef11d4f..341d333c 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,11 @@ +2007-04-23 + + * libsylph/ssl.c + src/sslmanager.c: OpenSSL によって確保された文字列に対して g_free() + でなく OPENSSL_free() を使用するようにした(MSVCR71.DLL にリンクした + OpenSSL DLL を使用した場合にクラッシュする問題を修正。岡村さん + thanks)。 + 2007-04-20 * version 2.4.0 diff --git a/libsylph/ssl.c b/libsylph/ssl.c index 00b46c9f..d3f7dff4 100644 --- a/libsylph/ssl.c +++ b/libsylph/ssl.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -244,12 +244,12 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method) if ((str = X509_NAME_oneline(X509_get_subject_name(server_cert), 0, 0)) != NULL) { debug_print(_(" Subject: %s\n"), str); - g_free(str); + OPENSSL_free(str); } if ((str = X509_NAME_oneline(X509_get_issuer_name(server_cert), 0, 0)) != NULL) { debug_print(_(" Issuer: %s\n"), str); - g_free(str); + OPENSSL_free(str); } verify_result = SSL_get_verify_result(sockinfo->ssl); diff --git a/src/sslmanager.c b/src/sslmanager.c index cfdeee6e..45845357 100644 --- a/src/sslmanager.c +++ b/src/sslmanager.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,8 +71,10 @@ gint ssl_manager_verify_cert(SockInfo *sockinfo, const gchar *hostname, hostname, X509_verify_cert_error_string(verify_result), subject ? subject : "(unknown)", issuer ? issuer : "(unknown)"); - g_free(issuer); - g_free(subject); + if (issuer) + OPENSSL_free(issuer); + if (subject) + OPENSSL_free(subject); dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), title); |