postgres.git / summary / log / commit / refs
commit 070179a4a2f8ebf8aefc90603237a3e794d3a9cf
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Thu Apr 19 13:45:15 2018 +0000
First released in: 11.0, 9.3.23, 9.4.18, 9.5.13, 9.6.9, 10.4
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/port/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/port/exec.c b/src/port/exec.c
index 077ac58b2b2..ceb886733c8 100644
--- a/src/port/exec.c
+++ b/src/port/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;
[parent: cf73a5b34a90]