In dissect_h245_OpenLogicalChannelCodec(), make sure codec_type exists before
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 14 Apr 2005 04:26:00 +0000 (04:26 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 14 Apr 2005 04:26:00 +0000 (04:26 +0000)
trying to access its contents.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14072 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/h245/packet-h245-template.c
epan/dissectors/packet-h245.c

index 05af9cafb6eb37aa608238c92306da0b18dc3312..55581f871fa8dbdc75060f018a7c10cd11c0ead9 100644 (file)
@@ -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);
   }
 
index ed49ad00390fbce7da69aa2cc1be73a325c08c39..c8045cfcd783c851b8c04a0523b2e557b40a05c8 100644 (file)
@@ -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);
   }