]> granicus.if.org Git - postgresql/commitdiff
Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Aug 2007 03:16:11 +0000 (03:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Aug 2007 03:16:11 +0000 (03:16 +0000)
src/pl/plpython/plpython.c

index 06313aceb6ac904f47881d66264aed50516d24c2..7c2a9701b4b95851432ce3d9432d743a0efc5e23 100644 (file)
@@ -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++)