commit d230db1b24154d9a0e4edb1fa524bf748ad37f25
parent b1e286dee7ea716a22bb4cfb04175aeaac0fe942
Author: wwp <subscript@free.fr>
Date: Thu, 15 Oct 2020 13:17:24 +0200
Use a correct buffer size here (BUFFSIZE), PATH_MAX has nothing to do with
what's needed.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/quote_fmt_parse.y b/src/quote_fmt_parse.y
@@ -522,7 +522,7 @@ static void quote_fmt_insert_file(const gchar *filename)
static void quote_fmt_insert_program_output(const gchar *progname)
{
FILE *file;
- char buffer[PATH_MAX];
+ char buffer[BUFFSIZE];
if ((file = popen(progname, "r")) != NULL) {
while (fgets(buffer, sizeof(buffer), file)) {
@@ -566,7 +566,7 @@ static void quote_fmt_attach_file(const gchar *filename)
static void quote_fmt_attach_file_program_output(const gchar *progname)
{
FILE *file;
- char buffer[PATH_MAX];
+ char buffer[BUFFSIZE];
if ((file = popen(progname, "r")) != NULL) {
/* get first line only */