From: Alvaro Herrera Date: Thu, 19 Apr 2018 13:45:15 +0000 (-0300) Subject: Enlarge find_other_exec's meager fgets buffer X-Git-Tag: REL9_5_13~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e160fa005e809c9b5b15232d73b3109278488a05;p=postgresql 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 --- diff --git a/src/common/exec.c b/src/common/exec.c index e5575d5f50..c2153c9f72 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;