From b3f4742aab82463166b327dbf26b3d4a5039e1c6 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 19 Apr 2018 10:45:15 -0300 Subject: [PATCH] Enlarge find_other_exec's meager fgets buffer The buffer was 100 bytes long, which is barely sufficient when the version string gets longer (such as by configure --with-extra-version). Set it to MAXPGPATH. Author: Nikhil Sontakke Discussion: https://postgr.es/m/CAMGcDxfLfpYU_Jru++L6ARPCOyxr0W+2O3Q54TDi5XdYeU36ow@mail.gmail.com --- src/common/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/exec.c b/src/common/exec.c index d736b02280..4206e22d6d 100644 --- a/src/common/exec.c +++ b/src/common/exec.c @@ -308,7 +308,7 @@ find_other_exec(const char *argv0, const char *target, const char *versionstr, char *retpath) { char cmd[MAXPGPATH]; - char line[100]; + char line[MAXPGPATH]; if (find_my_exec(argv0, retpath) < 0) return -1;