From 80b0ef5ffd6998818b3785c3c15bf2ae73687e09 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Thu, 19 Jan 2017 00:41:39 +0100 Subject: [PATCH] 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 --- utils/isohybrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 1a203213..a9e38d4d 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))