Skip to content

Commit

Permalink
UTF8: quartet check validates four bytes and then only skips the firs…
Browse files Browse the repository at this point in the history
…t three. Patched.

(cherry picked from commit e526fd844bcdad078bee386ca643095d1a9690dc)
  • Loading branch information
andrew-canaday committed Jun 2, 2024
1 parent b6c768d commit 8169f35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/ymo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ ymo_status_t ymo_check_utf8(
* - we could do 128, 256, or 512 bits at a time with SIMD
*/
if( len >= 4 && ((quartet(c,p) & 0x80808080) == 0) ) {
len -= 3;
p += 3;
len -= 4;
p += 4;
continue;
}

Expand Down

0 comments on commit 8169f35

Please sign in to comment.