diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-07-19 02:27:02 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-07-19 09:30:52 +0000 |
commit | 065a76257935e0699b6cf4aa2352d2f7de914a87 (patch) | |
tree | c3fbbf729617b2b8642349aef099a2cf197c3456 /extcap/udpdump.c | |
parent | 268883d1a7f8b47e8e30a66388504e6fc8efb813 (diff) |
Extcap programs must write to the packet pipe in binary mode.
It doesn't matter on UN*X, but it definitely matters on Windows; we're
writing a pcap file, not a text file, so every byte we write should go
down the pipe as is.
Bug: 14989
Change-Id: I26c067b8ff5dba644a579846dd97b568a81c7053
Reviewed-on: https://code.wireshark.org/review/28764
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'extcap/udpdump.c')
-rw-r--r-- | extcap/udpdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extcap/udpdump.c b/extcap/udpdump.c index 7ed6cbfdfd..121b3c4816 100644 --- a/extcap/udpdump.c +++ b/extcap/udpdump.c @@ -172,7 +172,7 @@ static int setup_dumpfile(const char* fifo, FILE** fp) return EXIT_SUCCESS; } - *fp = fopen(fifo, "w"); + *fp = fopen(fifo, "wb"); if (!(*fp)) { g_warning("Error creating output file: %s", g_strerror(errno)); return EXIT_FAILURE; |