[security] Fix a panic from an unchecked string slice. #28

Merged
nmathewson merged 1 commits from fix_string_slice into master 2021-11-14 13:45:34 -08:00

1 Commits

Author SHA1 Message Date
Nick Mathewson
c981004290 Fix a panic from an unchecked string slice.
When slicing a string, you get a panic if you do so at any point
other than at a character boundary.  This happened in the
implementation of UTCTime parsing.

This bug was introduced in bc156c36d7,
and appears to affect only version 0.6.0.

I've tried using the clippy::string_slice lint to confirm that there
are not any other string slices in this code.

Fixes bug #27.  Found via fuzzing.
2021-11-14 09:46:36 -05:00