• Max Kellermann's avatar
    lib/icu/Win32: paranoid-ify the buffer length checks · 99afe8e6
    Max Kellermann authored
    Passing `length+1` to `MultiByteToWideChar()` means the function may
    fill the whole buffer with output data, and could theoretically
    overwrite the null terminator.  In practice, this will never happen,
    but this way, it's slightly more correct.
    
    Also, null-terminate after `MultiByteToWideChar()`, after we got the
    real output length.  Again, this would never have been a problem, but
    who knows...
    99afe8e6
Win32.cxx 2.08 KB