talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 63e9f669694a07278a21c8b6f9869dcc1b6be8b4
parent 45c1dc4e6e39f9d5ac83816302d043b5dee565e6
Author: wwp <subscript@free.fr>
Date:   Fri,  3 Sep 2021 09:35:39 +0200

Bogofilter: use BUFFSIZE to dimension the exchange buffer w/ bogofilter.
Use the proper buffer size (tmpbuf).

Diffstat:
Msrc/plugins/bogofilter/bogofilter.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/bogofilter/bogofilter.c b/src/plugins/bogofilter/bogofilter.c @@ -174,7 +174,7 @@ static void bogofilter_do_filter(BogoFilterData *data) GSList *cur = NULL; int total = 0, curnum = 1; gchar *file = NULL; - gchar buf[BUFSIZ]; + gchar buf[BUFFSIZE]; total = g_slist_length(data->msglist); @@ -273,7 +273,7 @@ static void bogofilter_do_filter(BogoFilterData *data) if (claws_fwrite(tmpstr, 1, strlen(tmpstr), output) < strlen(tmpstr)) { err = TRUE; } else { - while (claws_fgets(tmpbuf, sizeof(buf), input)) { + while (claws_fgets(tmpbuf, sizeof(tmpbuf), input)) { if (claws_fputs(tmpbuf, output) == EOF) { err = TRUE; break;