aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhongYao Luo <LuoZhongYao@gmail.com>2021-06-16 22:05:54 +0800
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-07-10 16:07:28 +0000
commit2450e2220bb0e48502066a238487469a0bc33749 (patch)
tree333d4c57998a0fa4683254de7db71578010e425d
parent60dee56e4ccc3681e906416bfd232c31720c9d12 (diff)
Fix null pointer
In some cases, the fds parameter of frame_data_sequence_find is invalid, causing the software to crash, For example, this command echo'{"req":"frame","bytes":"yes","proto":"yes","frame":"1" }'|sharkd- (cherry picked from commit 64155132ea001dab7db030df96ce00b90a958277)
-rw-r--r--epan/frame_data_sequence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/frame_data_sequence.c b/epan/frame_data_sequence.c
index 9ec460a633..e580a44d60 100644
--- a/epan/frame_data_sequence.c
+++ b/epan/frame_data_sequence.c
@@ -183,7 +183,7 @@ frame_data_sequence_find(frame_data_sequence *fds, guint32 num)
frame_data ***level2;
frame_data ****level3;
- if (num == 0) {
+ if (num == 0 || fds == NULL) {
/* There is no frame number 0 */
return NULL;
}