to a refcursor declaration are specified. This is a minimally-invasive fix
for the buffer overrun -- a more thorough cleanup will be checked into
HEAD.
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.48 2003/10/30 17:18:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.48.2.1 2005/01/21 00:31:21 neilc Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
{
int i = $1->nfields++;
+ /* Guard against overflowing the array on malicious input */
+ if (i >= 1024)
+ yyerror("too many parameters specified for refcursor");
+
$1->fieldnames[i] = $3->refname;
$1->varnos[i] = $3->varno;