forked from osmocom/wireshark
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 64155132ea
)
This commit is contained in:
parent
60dee56e4c
commit
2450e2220b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue