From 0a7c57da7960ab0500f87a02a6f6aab669b34c62 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Thu, 20 Jul 2023 11:37:42 +0200 Subject: [PATCH] fix file access --- file.c | 2 +- http.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index fdcd1ee..786a895 100644 --- a/file.c +++ b/file.c @@ -32,7 +32,7 @@ int readfile (char **buffer, char *filename) VERBOSE (DEBUG, PRINT ("Reading %d bytes\n", size)); *buffer = calloc (size + 1, 1); - int len = fread (*buffer, size, 1, fd); + int len = fread (*buffer, 1, size, fd); if (len != size) { VERBOSE (WARNING, PRINT ("Can't read full file (%s)\n", filename)); } diff --git a/http.c b/http.c index 2f37611..22b5cbc 100644 --- a/http.c +++ b/http.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "debug.h" #include "file.h" -- 2.30.2