fix crash when SSL_CTX_new fails
- From: Zhouyang Jia <jiazhouyang09 gmail com>
- To: balsa-list gnome org
- Subject: fix crash when SSL_CTX_new fails
- Date: Sat, 5 Aug 2017 12:10:00 +0800
Hi,
I'm new to Balsa, I analyzed the source code and found a potential bug that may cause crash.
In balsa-2.5.3/libbalsa/imap/imap-tls.c:174:26, if "SSL_CTX_new" failed to initialize the SSL context, "SSL_CTX_set_options" would cause a crash since "global_ssl_context" is null.
I think it's unsafe to assume that the library function would be correct. It would be better if we could handle the error properly.
Attached please find the patch against version balsa-2.5.3. Hopefully, it can solve this potential bug.
Best,
Zhouyang
Attachment:
balsa-2.5.3.patch
Description: Binary data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]