[syslinux:master] isohybrid: Open ISO file in binary mode

syslinux-bot for Colin Finck colin at reactos.org
Sun May 14 08:21:19 PDT 2017


Commit-ID:  80b0ef5ffd6998818b3785c3c15bf2ae73687e09
Gitweb:     http://www.syslinux.org/commit/80b0ef5ffd6998818b3785c3c15bf2ae73687e09
Author:     Colin Finck <colin at reactos.org>
AuthorDate: Thu, 19 Jan 2017 00:41:39 +0100
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Sun, 14 May 2017 11:18:40 -0400

isohybrid: Open ISO file in binary mode

Open ISO file in binary mode to ensure that line endings stay untouched.

Signed-off-by: Gene Cumm <gene.cumm at gmail.com>

---
 utils/isohybrid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index 1a20321..a9e38d4 100644
--- a/utils/isohybrid.c
+++ b/utils/isohybrid.c
@@ -967,7 +967,7 @@ main(int argc, char *argv[])
 
     srand(time(NULL) << (getppid() << getpid()));
 
-    if (!(fp = fopen(argv[0], "r+")))
+    if (!(fp = fopen(argv[0], "rb+")))
         err(1, "could not open file `%s'", argv[0]);
 
     if (fseeko(fp, (off_t) (16 << 11), SEEK_SET))


More information about the Syslinux-commits mailing list