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-
This commit is contained in:
ZhongYao Luo 2021-06-16 22:05:54 +08:00 committed by Wireshark GitLab Utility
parent 759bb234d0
commit 64155132ea
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}