X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fvfprintf.c;h=55486d64d3597a72bdb49d9ce3e68af6a8e19247;hb=b4c2b236d0007a7f9226e6ccef82e9e37bdb2b3a;hp=6e3d595f81f1658ea960065d0091e39751474c14;hpb=2d4d7d9d00fe33b6f5291e00a30b6c1016775b74;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;