diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-07-02 21:14:01 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-07-05 12:10:06 +0100 |
| commit | ed68d1ff287d43c5293abb4d41e908aa8e50afec (patch) | |
| tree | b5ab042ba67259a63b2aa0ae99ad74a5bc646a7f /src/keys.cc | |
| parent | 3f70d91f8c716ef2dbc76abb9c878f86ecb946f7 (diff) | |
utf8: use end of sequence iterators for more security
Diffstat (limited to 'src/keys.cc')
| -rw-r--r-- | src/keys.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keys.cc b/src/keys.cc index 5dc5a1b9..4d6d5bc3 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -41,7 +41,7 @@ static const KeyAndName keynamemap[] = { KeyList parse_keys(StringView str) { KeyList result; - using PassPolicy = utf8::InvalidBytePolicy::Pass; + using PassPolicy = utf8::InvalidPolicy::Pass; using Utf8It = utf8::iterator<const char*, PassPolicy>; for (Utf8It it = str.begin(), str_end = str.end(); it < str_end; ++it) { @@ -71,7 +71,7 @@ KeyList parse_keys(StringView str) } if (keyname.char_length() == 1) { - result.push_back(Key{ modifier, utf8::codepoint<PassPolicy>(keyname.begin()) }); + result.push_back(Key{ modifier, utf8::codepoint<PassPolicy>(keyname.begin(),keyname.end()) }); it = end_it; continue; } |
