X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fvfprintf.c;h=55486d64d3597a72bdb49d9ce3e68af6a8e19247;hb=395f9e6a19b504609aa8b0bd7f8cc55d4547d8dd;hp=6e3d595f81f1658ea960065d0091e39751474c14;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/vfprintf.c b/lib/vfprintf.c index 6e3d595f8..55486d64d 100644 --- a/lib/vfprintf.c +++ b/lib/vfprintf.c @@ -1,5 +1,5 @@ /* Formatted output to a stream. - Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. 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 @@ -60,6 +60,9 @@ vfprintf (FILE *fp, const char *format, va_list args) return -1; } + if (output != buf) + free (output); + if (len > INT_MAX) { errno = EOVERFLOW;