Fix uninitialized-memory bug in plpython proargnames patch. Per bug #3523
authorTom Lane <[email protected]>
Fri, 10 Aug 2007 03:16:11 +0000 (03:16 +0000)
committerTom Lane <[email protected]>
Fri, 10 Aug 2007 03:16:11 +0000 (03:16 +0000)
src/pl/plpython/plpython.c

index a9b5c135842908a8632879c30620c1c822604b4e..03965de42a488cf4c4afb19ea536a4a3c135a890 100644 (file)
@@ -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++)