summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2019-12-28 13:49:40 +0200
committerRan Benita <ran@unusedvar.com>2019-12-28 13:49:40 +0200
commitda4a90c13e03d5a8684c66e7e8e69b174af822a0 (patch)
tree3a720ab5b8c6009578d838945ed6fdf50c67d1c3 /fuzz
parentfe417d841e838adfd57f591ea27bd34a999eeb77 (diff)
downloadxorg-lib-libxkbcommon-da4a90c13e03d5a8684c66e7e8e69b174af822a0.tar.gz
Open files in binary mode
This turns off some misfeatures on Windows, and does nothing on POSIX. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/compose/target.c2
-rw-r--r--fuzz/keymap/target.c2
2 files changed, 2 insertions, 2 deletions
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,