From 6fc46e5403dda15999d9464f91506675a64765ff Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Tue, 21 Sep 2010 22:03:54 -0300 Subject: [PATCH] Open files in binary mode --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 39cf7ccd3..0ea67b4c2 100644 --- a/util.c +++ b/util.c @@ -1099,7 +1099,7 @@ read_file(const char *path, size_t size_hint, char **data, size_t *size) } size_hint = (size_hint < 1024) ? 1024 : size_hint; - fd = open(path, O_RDONLY); + fd = open(path, O_RDONLY | O_BINARY); if (fd == -1) { return false; } -- 2.47.3