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

2013-07-08 Thread Junio C Hamano
Peter Krefting 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 > lower 16-bit

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 non-ch

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/guarante

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

2013-07-04 Thread Torsten Bögershausen
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 non-characters/code points out of range/ > this by explicitly checking for an