Re: [PATCH 2/2] commit: reject overlong UTF-8 sequences

2013-07-01 Thread Peter Krefting
brian m. carlson: int offset = 0; + static const unsigned int max_codepoint[] = { + 0x7f, 0x7ff, 0x, 0x1f + }; Since Unicode is not defined beyond U+10, you can easily make the last range end at U+10FFF. Doing that, ... if

[PATCH 2/2] commit: reject overlong UTF-8 sequences

2013-06-29 Thread brian m. carlson
The commit code accepts pseudo-UTF-8 sequences that encode a character with more bytes than necessary. Reject such sequences, since they are not valid UTF-8. Signed-off-by: brian m. carlson sand...@crustytoothpaste.net --- commit.c | 14 -- t/t3900-i18n-commit.sh