mozilla/rust — pull request #8133 by blake2-ppc (2013-07-30 17:40:09+00:00)
Title: Deny overlong encodings in UTF-8

Fix is_utf8 and UTF-8 char width functions to deny non-canonical 'overlong encodings' in UTF-8.

We address the function is_utf8 to make it more strict and correct, but no changes are made to the handling of invalid UTF-8.

Fixes issue #3787