From: wwp Date: Thu, 15 Oct 2020 07:04:24 +0000 (+0200) Subject: Use PATH_MAX instead of a hard-coded 256 path limit. X-Git-Tag: 3.17.8~7 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=f5a6451e5b5cb8615225c8111bcfe529f2fb2f07 Use PATH_MAX instead of a hard-coded 256 path limit. --- diff --git a/src/quote_fmt_parse.y b/src/quote_fmt_parse.y index 663a9ed6b..fbc4fc38a 100644 --- a/src/quote_fmt_parse.y +++ b/src/quote_fmt_parse.y @@ -508,7 +508,7 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body, static void quote_fmt_insert_file(const gchar *filename) { FILE *file; - char buffer[256]; + char buffer[PATH_MAX]; if ((file = g_fopen(filename, "rb")) != NULL) { while (fgets(buffer, sizeof(buffer), 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[256]; + char buffer[PATH_MAX]; if ((file = popen(progname, "r")) != NULL) { while (fgets(buffer, sizeof(buffer), file)) {