Fix potential segfault in ICUs error handling

`vsnprintf` returns the size of the string regardless of the buffer size. 

Fixes #3118