From fe82ab953c765929885777f8b089ebc7a38e4ae5 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 18 Jun 2017 18:18:08 +0200 Subject: [PATCH] Fix non-writable tempfile(), "rw" --> "w+", found by Westermo Signed-off-by: Joachim Nilsson --- tempfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tempfile.c b/tempfile.c index dec3472..e51c0c8 100644 --- a/tempfile.c +++ b/tempfile.c @@ -45,7 +45,7 @@ FILE *tempfile(void) if (-1 == fd) return NULL; - return fdopen(fd, "rw"); + return fdopen(fd, "w+"); #else return tmpfile(); /* Fallback on older GLIBC/Linux and actual UNIX systems */ #endif