Use a correct buffer size here (BUFFSIZE), PATH_MAX has nothing to do with
authorwwp <subscript@free.fr>
Thu, 15 Oct 2020 11:17:24 +0000 (13:17 +0200)
committerwwp <subscript@free.fr>
Thu, 15 Oct 2020 11:18:37 +0000 (13:18 +0200)
what's needed.

src/quote_fmt_parse.y

index fbc4fc38a7a7a3bc9db58d311bf656757c6c2b8f..e95b398704c103986a951b77fc84fe1485132c5c 100644 (file)
@@ -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 */