Skip to content

Commit f32527d

Browse files
authored
Fix NULL dereference in PCAPNG file_info handling (#1914)
1 parent 067e752 commit f32527d

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

3rdParty/LightPcapNg/LightPcapNg/src/light_pcapng_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ int light_get_next_packet(light_pcapng_t *pcapng, light_packet_header *packet_he
384384
light_read_record(pcapng->file, &pcapng->pcapng);
385385

386386
//End of file or something is broken!
387-
if (pcapng == NULL)
387+
if (pcapng == NULL || pcapng->file_info == NULL)
388388
return 0;
389389

390390
light_get_block_info(pcapng->pcapng, LIGHT_INFO_TYPE, &type, NULL);
Binary file not shown.

0 commit comments

Comments
 (0)