From da4a90c13e03d5a8684c66e7e8e69b174af822a0 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 28 Dec 2019 13:49:40 +0200 Subject: Open files in binary mode This turns off some misfeatures on Windows, and does nothing on POSIX. Signed-off-by: Ran Benita --- fuzz/compose/target.c | 2 +- fuzz/keymap/target.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'fuzz') diff --git a/fuzz/compose/target.c b/fuzz/compose/target.c index a7f15c1..25b4a25 100644 --- a/fuzz/compose/target.c +++ b/fuzz/compose/target.c @@ -31,7 +31,7 @@ main(int argc, char *argv[]) while (__AFL_LOOP(1000)) #endif { - file = fopen(argv[1], "r"); + file = fopen(argv[1], "rb"); assert(file); table = xkb_compose_table_new_from_file(ctx, file, "en_US.UTF-8", diff --git a/fuzz/keymap/target.c b/fuzz/keymap/target.c index e8c6fb5..9984476 100644 --- a/fuzz/keymap/target.c +++ b/fuzz/keymap/target.c @@ -30,7 +30,7 @@ main(int argc, char *argv[]) while (__AFL_LOOP(1000)) #endif { - file = fopen(argv[1], "r"); + file = fopen(argv[1], "rb"); assert(file); keymap = xkb_keymap_new_from_file(ctx, file, XKB_KEYMAP_FORMAT_TEXT_V1, -- cgit v1.2.1