aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-t38.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-12-21 19:28:48 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-12-21 19:28:48 +0000
commitdea0ec440d5b4119797ac320bed16b7d2b6fa760 (patch)
tree3a8ae2be2cb82414b7301599cc8f8f5403eff751 /epan/dissectors/packet-t38.h
parent9399f6c4afda9dbf6ad8b033360f6a5a839f20bc (diff)
Make the array for the "setup method" for RTP, RTCP, and T.38
conversations large enough to hold the maximum setup method size plus a trailing '\0'. Make the maximum setup method size 7, so that when the trailing '\0' is included the total array length is a power of 2. (The longest string currently used is "Skinny", which fits in 7 characters). This fixes problems in the RTP and RTCP dissectors similar to the one found in the T.38 dissector. Undo the previous change to packet-t38.c, as it's now safe to store in method[MAX_T38_SETUP_METHOD_SIZE], because the array now has MAX_T38_SETUP_METHOD_SIZE+1 characters. (Should we use "strlcpy()", and supply our own "strlcpy()" if the system and/or C library doesn't supply it? Its semantics are a bit cleaner than those of the "strncpy()"/null-terminate idiom, perhaps making it less likely that mistakes of this sort will be made.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12803 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-t38.h')
-rw-r--r--epan/dissectors/packet-t38.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-t38.h b/epan/dissectors/packet-t38.h
index 2967edafc1..a972580d9f 100644
--- a/epan/dissectors/packet-t38.h
+++ b/epan/dissectors/packet-t38.h
@@ -26,10 +26,10 @@
*/
/* Info to save in T38 conversation / packet-info */
-#define MAX_T38_SETUP_METHOD_SIZE 8
+#define MAX_T38_SETUP_METHOD_SIZE 7
struct _t38_conversation_info
{
- gchar method[MAX_T38_SETUP_METHOD_SIZE];
+ gchar method[MAX_T38_SETUP_METHOD_SIZE + 1];
guint32 frame_number;
};