Skip to content

Commit 9eeeb98

Browse files
author
Neil Conway
committed
Backpatch fix for buffer overrun in parsing refcursor parameters to
REL7_2_STABLE.
1 parent 13fab5b commit 9eeeb98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pl/plpgsql/src/gram.y

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.29.2.1 2002/05/21 18:50:18 tgl Exp $
7+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.29.2.2 2005/01/27 01:52:34 neilc Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -476,6 +476,10 @@ decl_cursor_arglist : decl_cursor_arg
476476
{
477477
int i = $1->nfields++;
478478

479+
/* Guard against overflowing the array on malicious input */
480+
if (i >= 1024)
481+
yyerror("too many parameters specified for refcursor");
482+
479483
$1->fieldnames[i] = $3->refname;
480484
$1->varnos[i] = $3->varno;
481485

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy