From 39d88e33aa2e7def9a99614659b4da9e858e83ba Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 2 Feb 2018 11:47:11 +0100 Subject: [PATCH] checksum remove UB on high chars --- src/core/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/settings.c b/src/core/settings.c index 3ebb9e4a..ba571e63 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -665,7 +665,7 @@ void sig_term(int n) would be nice but would just take more space without much real benefit */ static unsigned int file_checksum(const char *fname) { - char buf[512]; + unsigned char buf[512]; int f, ret, n; unsigned int checksum = 0;