diff options
Diffstat (limited to 'liberty.c')
-rw-r--r-- | liberty.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2753,6 +2753,11 @@ utf8_decode (const char **s, size_t len) // Check the rest of the sequence uint32_t cp = *p++ & ~mask; + + // Overlong sequence (possibly MUTF-8, not supported) + if (!cp && sequence_len) + return -1; + while (sequence_len && --sequence_len) { if (p == end) |