aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntp.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-11 14:58:19 +0200
committerAnders Broman <a.broman58@gmail.com>2015-10-12 04:23:51 +0000
commit52e5ada040e2697e3f3e6a43bb847481a7884609 (patch)
tree7474fbcd259f6e820dca868c9da5b0cd008fed8e /epan/dissectors/packet-ntp.c
parent77686a65a3913840c734b581783e0ca80fcf571e (diff)
NTP: fix dissection of SHA1 based message authentication code
The maximum MAC length is 160 bits, not 128. MAX_MAC_LEN can be safely increased as an extension should be > 4 bytes. Bug: 11580 Change-Id: I0ea5a1f85d644e57315f033f09241d7a79dd3a45 Reviewed-on: https://code.wireshark.org/review/10934 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ntp.c')
-rw-r--r--epan/dissectors/packet-ntp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c
index 5cf8070c80..3854a19c6b 100644
--- a/epan/dissectors/packet-ntp.c
+++ b/epan/dissectors/packet-ntp.c
@@ -67,7 +67,7 @@ void proto_reg_handoff_ntp(void);
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Key Identifier (optional) (32) |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Message Digest (optional) (128) |
+ * | Message Digest (optional) (128/160) |
* | |
* | |
* | |
@@ -473,9 +473,9 @@ static const value_string authentication_types[] = {
/*
- * Maximum MAC length.
+ * Maximum MAC length : 160 bits MAC + 32 bits Key ID
*/
-#define MAX_MAC_LEN (5 * sizeof (guint32))
+#define MAX_MAC_LEN (6 * sizeof (guint32))
static int proto_ntp = -1;