SOURCES: postgresql-gram.y.patch (NEW) - patch to address CAN-2005...

Jakub Bogusz qboosh at pld-linux.org
Thu Feb 10 14:26:56 CET 2005


On Thu, Feb 10, 2005 at 02:21:42PM +0100, radzio wrote:
> Author: radzio                       Date: Thu Feb 10 13:21:42 2005 GMT
> Module: SOURCES                       Tag: HEAD
> ---- Log message:
> - patch to address CAN-2005-0247
> 
> ---- Files affected:
> SOURCES:
>    postgresql-gram.y.patch (NONE -> 1.1)  (NEW)
> 
> ---- Diffs:
> 
> ================================================================
> Index: SOURCES/postgresql-gram.y.patch
> diff -u /dev/null SOURCES/postgresql-gram.y.patch:1.1
> --- /dev/null	Thu Feb 10 14:21:42 2005
> +++ SOURCES/postgresql-gram.y.patch	Thu Feb 10 14:21:37 2005
> @@ -0,0 +1,75 @@
> +--- pgsql/src/pl/plpgsql/src/gram.y	2005/01/21 00:31:21	1.48.2.1
> ++++ pgsql/src/pl/plpgsql/src/gram.y	2005/02/07 03:55:28	1.48.2.2
> +@@ -4,7 +4,7 @@
> +  *						  procedural language
> +  *
> +  * IDENTIFICATION
> +- *	  $Header$
> ++ *	  $Header$
> +  *
> +  *	  This software is copyrighted by Jan Wieck - Hamburg.
> +  *
> +@@ -1711,6 +1711,15 @@ read_sql_construct(int until,
> + 				plpgsql_dstring_append(&ds, yytext);
> + 				break;
> + 		}
> ++
> ++		/* Check for array overflow */
> ++		if (nparams >= 1024)
> ++		{
> ++			plpgsql_error_lineno = lno;
> ++			ereport(ERROR,
> ++					(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
> ++					 errmsg("too many variables specified in SQL statement")));
> ++		}
> + 	}
> + 
> + 	expr = malloc(sizeof(PLpgSQL_expr) + sizeof(int) * nparams - sizeof(int));

Wrong patch.
See:
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y.diff?r1=1.64.4.2;r2=1.64.4.3
(and it's log)

The same on HEAD (in charles's patch).


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/




More information about the pld-devel-en mailing list