View Single Post

   
  #2 (permalink)  
Old 04-10-2008, 12:01 PM
Tom Lane
 
Posts: n/a
Default Re: BUG #3523: plpython crash

"Julian" <julan@internode.on.net> writes:
> --see if this crashes for you.


Yup. I think this'll fix it:


Index: plpython.c
================================================== =================
RCS file: /cvsroot/pgsql/src/pl/plpython/plpython.c,v
retrieving revision 1.90
diff -c -r1.90 plpython.c
*** plpython.c 21 Nov 2006 21:51:05 -0000 1.90
--- plpython.c 10 Aug 2007 02:01:04 -0000
***************
*** 1237,1242 ****
--- 1237,1243 ----
"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++)



regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote