diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-10 03:16:11 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-10 03:16:11 +0000 |
commit | 75cfea7f00189390e6324c0e31420e42ca0a0685 (patch) | |
tree | c9abaae99350308dbc5c2cd90d58bd762aa7cf1f /src | |
parent | e32d51d541386cd2badc23e58b9ff15a319ba5bd (diff) | |
download | postgresql-75cfea7f00189390e6324c0e31420e42ca0a0685.tar.gz postgresql-75cfea7f00189390e6324c0e31420e42ca0a0685.zip |
Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523
Diffstat (limited to 'src')
-rw-r--r-- | src/pl/plpython/plpython.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index 06313aceb6a..7c2a9701b4b 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -1,7 +1,7 @@ /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.90 2006/11/21 21:51:05 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.90.2.1 2007/08/10 03:16:11 tgl Exp $ * ********************************************************************* */ @@ -1237,6 +1237,7 @@ PLy_procedure_create(FunctionCallInfo fcinfo, Oid tgreloid, "proargnames must have the same number of elements " "as the function has arguments"); proc->argnames = (char **) PLy_malloc(sizeof(char *) * proc->nargs); + memset(proc->argnames, 0, sizeof(char *) * proc->nargs); } } for (i = 0; i < fcinfo->nargs; i++) |