Re: [PATCH v2 1/2] commit: reject invalid UTF-8 codepoints

2013-07-08 Thread Junio C Hamano
Peter Krefting pe...@softwolves.pp.se writes: brian m. carlson: +/* U+FFFE and U+ are guaranteed non-characters. */ +if ((codepoint 0x1e) == 0xfffe) +return bad_offset; I missed this the first time around: All Unicode characters whose

Re: [PATCH v2 1/2] commit: reject invalid UTF-8 codepoints

2013-07-05 Thread Peter Krefting
brian m. carlson: + /* U+FFFE and U+ are guaranteed non-characters. */ + if ((codepoint 0x1e) == 0xfffe) + return bad_offset; I missed this the first time around: All Unicode characters whose lower 16-bits are FFFE or are

[PATCH v2 1/2] commit: reject invalid UTF-8 codepoints

2013-07-04 Thread brian m. carlson
The commit code already contains code for validating UTF-8, but it does not check for invalid values, such as guaranteed non-characters and surrogates. Fix this by explicitly checking for and rejecting such characters. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- commit.c

Re: [PATCH v2 1/2] commit: reject invalid UTF-8 codepoints

2013-07-04 Thread brian m. carlson
On Thu, Jul 04, 2013 at 09:58:08PM +0200, Torsten Bögershausen wrote: On 2013-07-04 19.19, brian m. carlson wrote: The commit code already contains code for validating UTF-8, but it does not check for invalid values, such as guaranteed non-characters and surrogates. Fix s/guaranteed