Skip to content
Browse files

* wap/wtls_pdu.c: fixed possible segfault.

      Thanks to Armindo Antunes <armindo.antunes at gmail.com> for this patch.

git-svn-id: https://svn.kannel.org/gateway/trunk@4952 a7d65f57-29cd-40c9-b71e-ebca51ad1b1d
  • Loading branch information...
1 parent 245b54d commit 959dbb6d38c99847c49f8bb83150d0d0f3cbff3e amalysh committed Feb 8, 2012
Showing with 8 additions and 4 deletions.
  1. +4 −0 ChangeLog
  2. +4 −4 wap/wtls_pdu.c
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2012-02-08 Alexander Malysh <amalysh at kannel.org>
+ * wap/wtls_pdu.c: fixed possible segfault.
+ Thanks to Armindo Antunes <armindo.antunes at gmail.com> for this patch.
+
2012-02-02 Alexander Malysh <amalysh at kannel.org>
* gw/bb_smscconn.c: fixed bb_smscconn_send_failed for DLRs.
View
8 wap/wtls_pdu.c
@@ -1121,12 +1121,12 @@ wtls_Payload *wtls_pdu_pack(wtls_PDU * pdu, WTLSMachine * wtls_machine)
void wtls_payload_dump(wtls_Payload * payload, int level)
{
- char *dbg = "wap.wtls", type[20], *data =
- octstr_get_cstr(payload->data);
-
- /* the message type */
+ char *dbg = "wap.wtls", type[20], *data;
if (!payload)
return;
+ data = octstr_get_cstr(payload->data);
+
+ /* the message type */
pduName(type, payload->type);
debug(dbg, 0, "%*sPayload type: %s", level, "", type);
if (payload->type == Handshake_PDU) {

0 comments on commit 959dbb6

Please sign in to comment.
Something went wrong with that request. Please try again.