summaryrefslogtreecommitdiff
path: root/base85.c
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@linux-foundation.org>2007-05-30 10:32:19 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2007-05-30 15:01:37 -0700
commit192a6be2a77ab3bf446237fdf6575b0aca863d9e (patch)
tree8ee58b598b0abffe78dcf16385320c53b74f4f52 /base85.c
parentgit-svn: avoid md5 calculation entirely if SVN doesn't provide one (diff)
downloadtgif-192a6be2a77ab3bf446237fdf6575b0aca863d9e.tar.xz
fix signed range problems with hex conversions
Make hexval_table[] "const". Also make sure that the accessor function hexval() does not access the table with out-of-range values by declaring its parameter "unsigned char", instead of "unsigned int". With this, gcc can just generate: movzbl (%rdi), %eax movsbl hexval_table(%rax),%edx movzbl 1(%rdi), %eax movsbl hexval_table(%rax),%eax sall $4, %edx orl %eax, %edx for the code to generate a byte from two hex characters. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'base85.c')
0 files changed, 0 insertions, 0 deletions