compat/fnmatch: fix off-by-one character class's length check
commitf10e3864dc3b0ba0051148f9b2b555df11fc337a
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 11 Nov 2012 10:13:57 +0000 (11 17:13 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Nov 2012 20:13:09 +0000 (20 12:13 -0800)
tree9b1a1fadcd268ecd0a7114d423a4451b652649a7
parent7e2010537e96d0a1144520222f20ba1dc3d61441
compat/fnmatch: fix off-by-one character class's length check

Character class "xdigit" is the only one that hits 6 character limit
defined by CHAR_CLASS_MAX_LENGTH. All other character classes are 5
character long and therefore never caught by this.

This should make xdigit tests in t3070 pass on Windows.

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/fnmatch/fnmatch.c