From: Tom Lane Date: Fri, 10 Aug 2007 03:16:04 +0000 (+0000) Subject: Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523 X-Git-Tag: REL8_3_BETA1~358 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0e5c0c0eeecf98bf9133dbe7515688984db04f1;p=thirdparty%2Fpostgresql.git Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523 --- diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index 934413d4e41..485550f9323 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.102 2007/07/13 04:57:59 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.103 2007/08/10 03:16:04 tgl Exp $ * ********************************************************************* */ @@ -1259,6 +1259,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++)