projects
/
openwrt
/
staging
/
stintel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
772e2c0
)
firmware-utils/buffalo-enc: explicitly use signed char for checksum function
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 12 Oct 2015 13:11:20 +0000
(13:11 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 12 Oct 2015 13:11:20 +0000
(13:11 +0000)
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
tools/firmware-utils/src/buffalo-lib.c
patch
|
blob
|
history
diff --git
a/tools/firmware-utils/src/buffalo-lib.c
b/tools/firmware-utils/src/buffalo-lib.c
index add3a7e0233adb01b4e3876dcc55d79e6a8cc456..b1d5ede0a287d270036d682cf45cee1444d80133 100644
(file)
--- 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;