mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Fix erroneous space calculation leading to core dump in dumpProcLangs,
per report from Olivier Prenant. Also fix off-by-one space calculation in ReadToc; this woould not have hurt us until we had more than 100 dependencies for a single object, but wrong is wrong.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* by PostgreSQL
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.327 2003/04/25 02:28:22 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.328 2003/05/03 22:18:59 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3591,7 +3591,7 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
|
||||
resetPQExpBuffer(delqry);
|
||||
|
||||
/* Make a dependency to ensure function is dumped first */
|
||||
deps = malloc(sizeof(char *) * (2 + (strcmp(lanvalidator, "0") != 0) ? 1 : 0));
|
||||
deps = malloc(sizeof(char *) * 10);
|
||||
depIdx = 0;
|
||||
|
||||
(*deps)[depIdx++] = strdup(lanplcallfoid);
|
||||
|
Reference in New Issue
Block a user