X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsnprintf.c;h=23ad9bb77f482ca1329a73e58d6e62e2c0aa1bd5;hb=2788a4851b551e1a3efb320a2878b809f2d8a9d7;hp=0221f977b31cd1ed6ae078e3986fbc6fafe2856e;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0;p=yaz-moved-to-github.git diff --git a/src/snprintf.c b/src/snprintf.c index 0221f97..23ad9bb 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ /** @@ -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