• Philip Withnall's avatar
    glib: Port various callers to use g_utf8_validate_len() · 1c421b01
    Philip Withnall authored
    These were callers which explicitly specified the string length to
    g_utf8_validate(), when it couldn’t be negative, and hence should be
    able to unconditionally benefit from the increased string handling
    At least one call site would have previously silently changed behaviour
    if called with strings longer than G_MAXSSIZE in length.
    Another call site was passing strlen(string) to g_utf8_validate(), which
    seems pointless: just pass -1 instead, and let g_utf8_validate()
    calculate the string length. Its behaviour on embedded nul bytes
    wouldn’t change, as strlen() stops at the first one.
    Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
glocalfileinfo.c 72.3 KB