diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-10-12 13:11:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-10-12 13:11:20 +0000 |
commit | 86492a1eb8eafb4f8948e02956fb9e6ff62e102a (patch) | |
tree | 62f70bac27ff0f4e482d1d16287d5cf0f5e55ae7 /tools | |
parent | 772e2c0a77b5ef3748f40028ca76df6134d5ee49 (diff) | |
download | mtk-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')
-rw-r--r-- | tools/firmware-utils/src/buffalo-lib.c | 2 |
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; |