diff options
author | David Perry <boolean263@protonmail.com> | 2022-07-05 16:59:19 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2022-07-05 16:59:19 +0000 |
commit | 82408922fd681b5a6ac47c6dd32fdef88efb2414 (patch) | |
tree | e9edd718af3b95f8eb0c9c00a5113f823a37189d /file.c | |
parent | 6684583c7ca814fbf8929abad16ae23e4c2e9f51 (diff) |
Prevent null dereference in `rescan_file()`
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4591,7 +4591,9 @@ rescan_file(capture_file *cf, const char *fname, gboolean is_tempfile) &data_offset))) { framenum++; fdata = frame_data_sequence_find(cf->provider.frames, framenum); - fdata->file_off = data_offset; + if (G_LIKELY(fdata != NULL)) { + fdata->file_off = data_offset; + } if (size >= 0) { count++; cf->f_datalen = wtap_read_so_far(cf->provider.wth); |