X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fdropin.c;h=a99c828f416d91a5b8e0636f9f18b97545daccd1;hp=eb17acaad082ecb40d489bd5f7c0022cdadcd7d7;hb=57bbc06733b973fb0ed8ba226f9159de870768b2;hpb=68f4ca711593416d0defd81199b176ba604c6cb1 diff --git a/src/dropin.c b/src/dropin.c index eb17acaa..a99c828f 100644 --- a/src/dropin.c +++ b/src/dropin.c @@ -1,7 +1,7 @@ /* dropin.c -- a set of drop-in replacements for libc functions Copyright (C) 2000-2005 Ivo Timmermans, - 2000-2011 Guus Sliepen + 2000-2016 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -140,6 +140,7 @@ int vasprintf(char **buf, const char *fmt, va_list ap) { va_copy(aq, ap); status = vsnprintf(*buf, len, fmt, aq); + buf[len - 1] = 0; va_end(aq); if(status >= 0)