Re: BUG #3523: plpython crash - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3523: plpython crash
Date
Msg-id 9014.1186715896@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3523: plpython crash  ("Julian" <julan@internode.on.net>)
List pgsql-bugs
"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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3525: Lithuanian characters doesn't work in queries with regular expressions
Next
From: ""
Date:
Subject: BUG #3530: Can't start as service if sb created 'c:\program' file