Skip to content

Commit

Permalink
Fix utf8-c8 decode crash caused by off-by-1.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 1, 2016
1 parent b9afd77 commit 4afd7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/strings/utf8_c8.c
Expand Up @@ -247,7 +247,7 @@ MVMString * MVM_string_utf8_c8_decode(MVMThreadContext *tc, const MVMObject *res

orig_bytes = bytes;
orig_utf8 = utf8;
last_accept_utf8 = utf8;
last_accept_utf8 = utf8 - 1;

for (; bytes; ++utf8, --bytes) {
switch(decode_utf8_byte(&state, &codepoint, (MVMuint8)*utf8)) {
Expand Down

0 comments on commit 4afd7b6

Please sign in to comment.