Commit 6d5aae7a authored by Bruce Momjian's avatar Bruce Momjian

Now that the shared library name can be adjusted in the library test,

have pg_upgrade allocate a maximum fixed size buffer for testing the
library file name, rather than base the allocation on the library name.

Backpatch to 9.1.
parent a7f2c79a
...@@ -225,7 +225,7 @@ check_loadable_libraries(void) ...@@ -225,7 +225,7 @@ check_loadable_libraries(void)
{ {
char *lib = os_info.libraries[libnum]; char *lib = os_info.libraries[libnum];
int llen = strlen(lib); int llen = strlen(lib);
char *cmd = (char *) pg_malloc(8 + 2 * llen + 1); char cmd[7 + 2 * MAXPGPATH + 1];
PGresult *res; PGresult *res;
/* /*
...@@ -266,7 +266,6 @@ check_loadable_libraries(void) ...@@ -266,7 +266,6 @@ check_loadable_libraries(void)
} }
PQclear(res); PQclear(res);
pg_free(cmd);
} }
PQfinish(conn); PQfinish(conn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment