[AGENT++] fopen(..."r"...) vs. fopen(..."rb"...)
Chuck Bueche
chuckb at craniac.com
Thu Aug 11 17:50:05 CEST 2005
I've found what appears to be a fix for a problem I was having with
MibEntry::load_from_file() and MibEntry::save_to_file() under Win32.
Those functions use "r" and "w" access methods passed to fopen(), which will
perform text processing on the files. Since the files are being saved in a
binary (encrypted?) form, text processing is dropping needed data. Changing
the fopen() parameters to "rb" and "wb" has fixed the problem.
I see that there are several fopen() calls in the libraries that might
benefit from such a modification.
Thanks,
Chuck Bueche
Craniac, Inc.
More information about the AGENTPP
mailing list