Skip to content

Commit d0e5c0c

Browse files
committed
Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523
1 parent 509bfd6 commit d0e5c0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pl/plpython/plpython.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.102 2007/07/13 04:57:59 tgl Exp $
4+
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.103 2007/08/10 03:16:04 tgl Exp $
55
*
66
*********************************************************************
77
*/
@@ -1259,6 +1259,7 @@ PLy_procedure_create(FunctionCallInfo fcinfo, Oid tgreloid,
12591259
"proargnames must have the same number of elements "
12601260
"as the function has arguments");
12611261
proc->argnames = (char **) PLy_malloc(sizeof(char *) * proc->nargs);
1262+
memset(proc->argnames, 0, sizeof(char *) * proc->nargs);
12621263
}
12631264
}
12641265
for (i = 0; i < fcinfo->nargs; i++)

0 commit comments

Comments
 (0)