diff --git a/[refs] b/[refs] index 56058aa8f9ef..284fe3f7da7e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 27d68a36c4f1ca2fc6be82620843493462c08c51 +refs/heads/master: 0a6047eef1c465c38aacfbdab193161b3f0cd144 diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index 797428afd111..bed7229378f2 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -489,7 +489,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) if (str < end) *str = '\0'; else - *end = '\0'; + end[-1] = '\0'; } /* the trailing null byte doesn't count towards the total */ return str-buf;