From ae43e76cb92ebbb62faf8c571fbb05f86ff79936 Mon Sep 17 00:00:00 2001 From: wesinator <5124946+wesinator@users.noreply.github.com> Date: Sun, 3 Jun 2018 00:03:31 -0400 Subject: [PATCH] Remove fopen mixed modes Fixes #2 --- lib/luks/luks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/luks/luks.c b/lib/luks/luks.c index fd74d60..b7efc6b 100644 --- a/lib/luks/luks.c +++ b/lib/luks/luks.c @@ -284,7 +284,7 @@ int read_header(pheader *header, char *path, int *slot){ FILE *disk; int i; - if(!(disk=fopen(path,"rb+"))){ + if(!(disk=fopen(path,"rb"))){ errprint("cannot open file: %s\n",path); return 0; } @@ -437,7 +437,7 @@ int read_disk(unsigned char *dst, size_t size, char *path, size_t offset){ FILE *file; - if(!(file=fopen(path,"rb+"))){ + if(!(file=fopen(path,"rb"))){ perror("fopen"); return 0; }