39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From a8c93de0b0130ed5f4aab59338372783054898ea Mon Sep 17 00:00:00 2001
|
|
From: Gerald Combs <gerald@wireshark.org>
|
|
Date: Tue, 27 Nov 2018 12:23:31 -0800
|
|
Subject: [PATCH] pvfs2: Add a pointer check.
|
|
|
|
Make sure a pointer isn't NULL before trying to dereference it.
|
|
|
|
Bug: 15280
|
|
Change-Id: If2686940a0347154d9a59f5e2141511e7e1f49a4
|
|
Reviewed-on: https://code.wireshark.org/review/30807
|
|
Reviewed-by: Gerald Combs <gerald@wireshark.org>
|
|
Petri-Dish: Gerald Combs <gerald@wireshark.org>
|
|
Tested-by: Petri Dish Buildbot
|
|
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
---
|
|
epan/dissectors/packet-pvfs2.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c
|
|
index e2b61be..1c1012c 100644
|
|
--- a/epan/dissectors/packet-pvfs2.c
|
|
+++ b/epan/dissectors/packet-pvfs2.c
|
|
@@ -2314,6 +2314,12 @@ dissect_pvfs2_getconfig_response(tvbuff_t *tvb, proto_tree *parent_tree,
|
|
/* Get pointer to server config data */
|
|
ptr = tvb_get_ptr(tvb, offset, total_config_bytes);
|
|
|
|
+ if (!ptr)
|
|
+ {
|
|
+ /* Not enough data. Bail out. */
|
|
+ return offset;
|
|
+ }
|
|
+
|
|
/* Check if all data is available */
|
|
length_remaining = tvb_captured_length_remaining(tvb, offset);
|
|
|
|
--
|
|
1.7.12.4
|
|
|