]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3373. [bug] win32: open raw files in binary mode. [RT #30944]
authorMark Andrews <marka@isc.org>
Wed, 9 Jan 2013 06:03:03 +0000 (17:03 +1100)
committerMark Andrews <marka@isc.org>
Wed, 9 Jan 2013 06:03:03 +0000 (17:03 +1100)
was not complete openfile_fast and openfile_raw should be using mode "rb"
rather than "r".

lib/dns/master.c

index ad5a4a0fe66073c6fa3175fd024ac2a9c970afd1..0c7ea103a2e0593245192df921f7c618ab557228 100644 (file)
@@ -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",