1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 00:37:55 +01:00
git/xdiff
Jonathan Nieder 349362cc20 xdiff: cast arguments for ctype functions to unsigned char
The ctype functions isspace(), isalnum(), et al take an integer
argument representing an unsigned character, or -1 for EOF.  On
platforms with a signed char, it is unsafe to pass a char to them
without casting it to unsigned char first.

Most of git is already shielded against this by the ctype
implementation in git-compat-util.h, but xdiff, which uses libc
ctype.h, ought to be fixed.

Noticed-by: der Mouse <mouse@Rodents-Montreal.ORG>
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06 10:46:45 -07:00
..
xdiff.h xdl_merge(): move file1 and file2 labels to xmparam structure 2010-03-20 20:36:10 -07:00
xdiffi.c
xdiffi.h
xemit.c
xemit.h
xinclude.h
xmacros.h xdiff: cast arguments for ctype functions to unsigned char 2010-10-06 10:46:45 -07:00
xmerge.c xdiff: cast arguments for ctype functions to unsigned char 2010-10-06 10:46:45 -07:00
xpatience.c
xprepare.c
xprepare.h
xtypes.h
xutils.c xdiff: cast arguments for ctype functions to unsigned char 2010-10-06 10:46:45 -07:00
xutils.h