libfreerdp-utils/pcap: open pcap in binary mode
Use 'b' in fopen's mode string to force binary (untranslated) mode when reading or writing the pcap file. This is required on WIN32 and maybe on other non POSIX conforming systems. This fixes the mstsc internal error disconnect followed by a crash of the sample server when latter is used to serve a pcap file on WIN32.
This commit is contained in:
parent
84aa209322
commit
9df9c7d28a
@ -158,7 +158,7 @@ rdpPcap* pcap_open(char* name, BOOL write)
|
||||
{
|
||||
rdpPcap* pcap;
|
||||
|
||||
FILE* pcap_fp = fopen(name, write ? "w+" : "r");
|
||||
FILE* pcap_fp = fopen(name, write ? "w+b" : "rb");
|
||||
|
||||
if (pcap_fp == NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user