From: Mark Andrews Date: Wed, 9 Jan 2013 06:03:03 +0000 (+1100) Subject: 3373. [bug] win32: open raw files in binary mode. [RT #30944] X-Git-Tag: v9.10.0a1~605 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=513b5e8e5186392c12f3b2cba6874e2ed5a21c03;p=thirdparty%2Fbind9.git 3373. [bug] win32: open raw files in binary mode. [RT #30944] was not complete openfile_fast and openfile_raw should be using mode "rb" rather than "r". --- diff --git a/lib/dns/master.c b/lib/dns/master.c index ad5a4a0fe66..0c7ea103a2e 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -2177,7 +2177,7 @@ static isc_result_t openfile_fast(dns_loadctx_t *lctx, const char *master_file) { isc_result_t result; - result = isc_stdio_open(master_file, "r", &lctx->f); + result = isc_stdio_open(master_file, "rb", &lctx->f); if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) { UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_stdio_open() failed: %s", @@ -2216,7 +2216,7 @@ static isc_result_t openfile_raw(dns_loadctx_t *lctx, const char *master_file) { isc_result_t result; - result = isc_stdio_open(master_file, "r", &lctx->f); + result = isc_stdio_open(master_file, "rb", &lctx->f); if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) { UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_stdio_open() failed: %s",