From 2f3a3716131816e735a451d706fe617db0f917e6 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 14 Apr 2005 04:26:00 +0000 Subject: [PATCH] In dissect_h245_OpenLogicalChannelCodec(), make sure codec_type exists before trying to access its contents. svn path=/trunk/; revision=14072 --- asn1/h245/packet-h245-template.c | 2 +- epan/dissectors/packet-h245.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c index 05af9cafb6..55581f871f 100644 --- a/asn1/h245/packet-h245-template.c +++ b/asn1/h245/packet-h245-template.c @@ -278,7 +278,7 @@ dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pin if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn; - if (codec_str){ + if (codec_str && codec_type){ strncpy(codec_str, codec_type, 50); } diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index ed49ad0039..c8045cfcd7 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -16376,7 +16376,7 @@ dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, int offset, packet_info *pin if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn; - if (codec_str){ + if (codec_str && codec_type){ strncpy(codec_str, codec_type, 50); }