summaryrefslogtreecommitdiff
path: root/tools/firmware-utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-10-12 13:11:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-10-12 13:11:20 +0000
commit86492a1eb8eafb4f8948e02956fb9e6ff62e102a (patch)
tree62f70bac27ff0f4e482d1d16287d5cf0f5e55ae7 /tools/firmware-utils
parent772e2c0a77b5ef3748f40028ca76df6134d5ee49 (diff)
downloadmtk-20170518-86492a1eb8eafb4f8948e02956fb9e6ff62e102a.zip
mtk-20170518-86492a1eb8eafb4f8948e02956fb9e6ff62e102a.tar.gz
mtk-20170518-86492a1eb8eafb4f8948e02956fb9e6ff62e102a.tar.bz2
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 <nbd@openwrt.org> SVN-Revision: 47186
Diffstat (limited to 'tools/firmware-utils')
-rw-r--r--tools/firmware-utils/src/buffalo-lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/buffalo-lib.c b/tools/firmware-utils/src/buffalo-lib.c
index add3a7e..b1d5ede 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;