From 33ce39ff7176b24417e4f99034c3a835e8ec0ad7 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 30 Apr 2015 14:33:59 +0200 Subject: [PATCH] nfc-relay-picc: fix wrong open mode for file descriptor Fixes #280 --- utils/nfc-relay-picc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/nfc-relay-picc.c b/utils/nfc-relay-picc.c index 41f8c58..802372b 100644 --- a/utils/nfc-relay-picc.c +++ b/utils/nfc-relay-picc.c @@ -226,7 +226,7 @@ main(int argc, char *argv[]) nfc_exit(context); exit(EXIT_FAILURE); } - if ((fd4 = fdopen(4, "r")) == NULL) { + if ((fd4 = fdopen(4, "w")) == NULL) { ERR("Could not open file descriptor 4"); nfc_exit(context); exit(EXIT_FAILURE);