Skip to content
  • Todd Carson's avatar
    g_utf8_normalize: don't read past the end of the buffer · 7f4726d1
    Todd Carson authored and Philip Withnall's avatar Philip Withnall committed
    _g_utf8_normalize_wc() could read past the end of the provided buffer if
    it ends with a truncated multibyte character. If max_len is -1, it can
    continue reading until it encounters either a NUL or unreadable
    memory. Avoid this with extra bounds checks prior to g_utf8_get_char()
    to ensure that it does not read past either max_len or a NUL
    terminator.
    7f4726d1