From c6f8f0e73654f90e5050da668d40d9af2d0b8759 Mon Sep 17 00:00:00 2001 From: Tom MTT Date: Tue, 29 Nov 2022 14:16:11 +0100 Subject: [PATCH] fix(bin.c): error check and paste size --- bin.c | 2 +- config.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin.c b/bin.c index d744b8b..a927f78 100644 --- a/bin.c +++ b/bin.c @@ -91,7 +91,7 @@ int write_paste(char *paste, unsigned long paste_size, char *id) return -1; /* write the content to file */ - if (fwrite(paste, paste_size, sizeof(char), file) == -1) { + if (fwrite(paste, sizeof(char), paste_size, file) != paste_size) { fclose(file); return -1; } diff --git a/config.mk b/config.mk index 9bf583c..87cb54d 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # feuille version -VERSION = 1.19.0 +VERSION = 1.19.1 # paths (customize them to fit your system) PREFIX = /usr/local