Modify ↓
Opened at 2017-08-06T01:54:16Z
Closed at 2017-08-17T17:27:21Z
#1294 closed defect (other)
fix crash when gcry_cipher_open fails
Reported by: | 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: |
Description
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)
Change History (3)
Changed at 2017-08-06T01:55:17Z by
Attachment: | bitlbee-3.5.1.patch added |
---|
comment:1 Changed at 2017-08-06T02:37:27Z by
Sorry, this bug could never happen, please close this tickey.
Note: See
TracTickets for help on using
tickets.
fix the potential crash by adding error handling code