Fixed potential overflow issue with the estimations of string buffer lengths
Fixed C89 build issue in Win32