tcpdump mailing list archives
Re: savefile.c patch
From: Guy Harris <guy () alum mit edu>
Date: Wed, 26 May 2004 14:35:01 -0700
On May 26, 2004, at 2:16 PM, Gisle Vanem wrote:
I wasn't sure why either. Maybe reducing the chance of a file with truncated packets. I just moved setbuf() further up.
Actually, you moved the "if (f == NULL)" check down, leaving the "setbuf()" where it was, and also removed the "#ifdef WIN32"/"#endif" around the "setbuf()".
That means the "setbuf()" will be done on UN*X as well - and also means that it'll try to do the "setbuf()" even if the "fopen()" fails, which will probably crash the program when it tries to dereference a null pointer.
Also, that means that if it's writing to the standard output it won't do a "setbuf()" even on Windows.
- This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- savefile.c patch Gisle Vanem (May 26)
- Re: savefile.c patch Guy Harris (May 26)
- Re: savefile.c patch Gisle Vanem (May 26)
- Re: savefile.c patch Guy Harris (May 26)
- Re: savefile.c patch Guy Harris (May 26)
- Re: savefile.c patch Gisle Vanem (May 27)
- Re: savefile.c patch Gisle Vanem (May 27)
- Re: savefile.c patch Guy Harris (May 27)
- How to extract the source name field data of the netbeui (NBF) protocol Bassam A. Al-Khaffaf (May 27)
- Re: How to extract the source name field data of Jun-ichiro itojun Hagino (May 27)
- Re: How to extract the source name field data of Bassam A. Al-Khaffaf (May 27)
- Re: How to extract the source name field data of Jun-ichiro itojun Hagino (May 28)
- Re: How to extract the source name field data of Guy Harris (May 28)
- Re: How to extract the source name field data of Guy Harris (May 30)
- Re: savefile.c patch Gisle Vanem (May 26)
- Re: savefile.c patch Guy Harris (May 26)