From 86492a1eb8eafb4f8948e02956fb9e6ff62e102a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 12 Oct 2015 13:11:20 +0000 Subject: [PATCH] firmware-utils/buffalo-enc: explicitly use signed char for checksum function ARM defaults to unsigned char and that breaks the calculation, as it relies on sign extension Signed-off-by: Felix Fietkau SVN-Revision: 47186 --- tools/firmware-utils/src/buffalo-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/buffalo-lib.c b/tools/firmware-utils/src/buffalo-lib.c index add3a7e0233a..b1d5ede0a287 100644 --- a/tools/firmware-utils/src/buffalo-lib.c +++ b/tools/firmware-utils/src/buffalo-lib.c @@ -179,7 +179,7 @@ int bcrypt_buf(unsigned char seed, unsigned char *key, unsigned char *src, uint32_t buffalo_csum(uint32_t csum, void *buf, unsigned long len) { - char *p = buf; + signed char *p = buf; while (len--) { int i; -- 2.30.2