The previous commit was about as wrong as the code it
"fixed" and could still result in a buffer that wasn't
large enough to hold all the output from the external filter.
Submitted by Yang Xia in #892.
-const char filters_rcs[] = "$Id: filters.c,v 1.192 2014/10/18 11:30:24 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.193 2015/08/12 10:34:21 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
char *p;
/* Could be considered wasteful if the content is 'large'. */
- *size = (*size > READ_LENGTH) ? *size * 2 : READ_LENGTH;
+ *size += (*size >= READ_LENGTH) ? *size : READ_LENGTH;
p = realloc(filter_output, *size);
if (p == NULL)