Skip to content

Commit

Permalink
Input file must be opened in binary mode
Browse files Browse the repository at this point in the history
getmagicnumber expects input file to be opened in the binary mode
  • Loading branch information
wizardsd authored Jul 15, 2024
1 parent 1c19fe1 commit 3770a1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5690,7 +5690,7 @@ if(testgzipfile(pcapinname) == true)
}
#endif
jtrbasenamedeprecated = pcapinname;
fd_pcap = open(pcapnameptr, O_RDONLY);
fd_pcap = open(pcapnameptr, O_RDONLY | O_BINARY);
if(fd_pcap == -1)
{
perror("failed to open file");
Expand Down

0 comments on commit 3770a1a

Please sign in to comment.