X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsnprintf.c;h=a3903ed525701d6d550a110e89e459ad31b22620;hb=0e7513faa0f309121e7800827685f9bdccd2eeb9;hp=0221f977b31cd1ed6ae078e3986fbc6fafe2856e;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/src/snprintf.c b/src/snprintf.c index 0221f97..a3903ed 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -17,7 +17,8 @@ void yaz_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap) vsnprintf(buf, size, fmt, ap); #else #ifdef WIN32 - _vsnprintf(buf, size, fmt, ap); + _vsnprintf(buf, size-1, fmt, ap); + buf[size-1] = '\0'; #else vsprintf(buf, fmt, ap); #endif