pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/postgresql80 pull in the patch from http://a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/756567fea477
branches:  trunk
changeset: 490680:756567fea477
user:      jschauma <jschauma%pkgsrc.org@localhost>
date:      Thu Mar 17 20:56:46 2005 +0000

description:
pull in the patch from http://archives.postgresql.org/pgsql-committers/2005-02/msg00049.php
which should fix CAN-2005-0247

diffstat:

 databases/postgresql80/distinfo         |   3 +-
 databases/postgresql80/patches/patch-ab |  70 +++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 1 deletions(-)

diffs (86 lines):

diff -r 2fb813bc62d7 -r 756567fea477 databases/postgresql80/distinfo
--- a/databases/postgresql80/distinfo   Thu Mar 17 18:39:06 2005 +0000
+++ b/databases/postgresql80/distinfo   Thu Mar 17 20:56:46 2005 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2005/02/23 16:33:09 agc Exp $
+$NetBSD: distinfo,v 1.3 2005/03/17 20:56:46 jschauma Exp $
 
 SHA1 (postgresql-8.0.1.tar.bz2) = 42a16fe13a6271b1612fb0a9f41f7da0a2e307b6
 RMD160 (postgresql-8.0.1.tar.bz2) = 8aca3b38d2e37efe5ed1ff16e942daad2e486e1f
 Size (postgresql-8.0.1.tar.bz2) = 11049626 bytes
 SHA1 (patch-aa) = 20492216de0e5238a02b4cdd18c297731cf6462a
+SHA1 (patch-ab) = 2b3a45b3d1c529a0d4202e5a095f4d9391507e82
diff -r 2fb813bc62d7 -r 756567fea477 databases/postgresql80/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql80/patches/patch-ab   Thu Mar 17 20:56:46 2005 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-ab,v 1.1 2005/03/17 20:56:46 jschauma Exp $
+
+--- src/pl/plpgsql/src/gram.y.orig     2005-03-17 15:43:26.000000000 -0500
++++ src/pl/plpgsql/src/gram.y  2005-03-17 15:43:31.000000000 -0500
+@@ -1794,6 +1794,15 @@
+               }
+       }
+ 
++      /* 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")));
++      }
++
+       if (endtoken)
+               *endtoken = tok;
+ 
+@@ -1940,6 +1949,16 @@
+ 
+                                       while ((tok = yylex()) == ',')
+                                       {
++                                              /* Check for array overflow */
++                                              if (nfields >= 1024)
++                                              {
++                                                      plpgsql_error_lineno = plpgsql_scanner_lineno();
++                                                      ereport(ERROR,
++                                                                      (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
++                                                                      errmsg("too many INTO variables specified")));
++                                              }
++
++
+                                               tok = yylex();
+                                               switch(tok)
+                                               {
+@@ -2014,6 +2033,16 @@
+                               plpgsql_dstring_append(&ds, yytext);
+                               break;
+               }
++
++              /* Check for array overflow */
++              if (nparams >= 1024)
++              {
++                      plpgsql_error_lineno = plpgsql_scanner_lineno();
++                      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));
+@@ -2085,6 +2114,15 @@
+ 
+                               while ((tok = yylex()) == ',')
+                               {
++                                      /* Check for array overflow */
++                                      if (nfields >= 1024)
++                                      {
++                                              plpgsql_error_lineno = plpgsql_scanner_lineno();
++                                              ereport(ERROR,
++                                                              (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
++                                                              errmsg("too many INTO variables specified")));
++                                      }
++
+                                       tok = yylex();
+                                       switch(tok)
+                                       {



Home | Main Index | Thread Index | Old Index