From: Felix Fietkau Date: Mon, 12 Oct 2015 13:11:20 +0000 (+0000) Subject: firmware-utils/buffalo-enc: explicitly use signed char for checksum function X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=86492a1eb8eafb4f8948e02956fb9e6ff62e102a;p=openwrt%2Fstaging%2Fynezz.git 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 --- diff --git a/tools/firmware-utils/src/buffalo-lib.c b/tools/firmware-utils/src/buffalo-lib.c index add3a7e023..b1d5ede0a2 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;