#1294 closed defect (other)

fix crash when gcry_cipher_open fails

Reported by: jiazhouyang09@… Owned by:
Priority: normal Milestone:
Component: BitlBee Version: devel
Keywords: crash gcry_cipher_open Cc:
IRC client+version: Client-independent Operating System: Public server
OS version/distro:


I analyzed the source code and found a potential bug that may cause crash.

In bitlbee-3.5.1/lib/ssl_gnutls.c:480:7, if "gcry_cipher_open" failed to open, "gcry_cipher_setkey" would cause a crash since "gcr" 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 bitlbee-3.5.1. Hopefully, it can solve this potential bug.

Attachments (1)

bitlbee-3.5.1.patch (663 bytes) - added by jiazhouyang09@… at 2017-08-06T01:55:17Z.
fix the potential crash by adding error handling code

Download all attachments as: .zip

Change History (3)

Changed at 2017-08-06T01:55:17Z by jiazhouyang09@…

Attachment: bitlbee-3.5.1.patch added

fix the potential crash by adding error handling code

comment:1 Changed at 2017-08-06T02:37:27Z by jiazhouyang09@…

Sorry, this bug could never happen, please close this tickey.

comment:2 Changed at 2017-08-17T17:27:21Z by dx

Resolution: other
Status: newclosed


Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.