[libpostgresql-jdbc-java] 05/08: Fix a bug in function escape processing. When dealing with an invalid escape the code attempted to read until it hit the escape end and press on, but it forgot to increment its position counter. This lead to an infinite loop that eventually resulted in an out of memory error.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_0_318
in repository libpostgresql-jdbc-java.
commit d573a63bfdb5f36c9a9cbd3dec5316a70bc1891b
Author: Kris Jurka <books at ejurka.com>
Date: Tue Sep 26 04:42:31 2006 +0000
Fix a bug in function escape processing. When dealing with an
invalid escape the code attempted to read until it hit the escape
end and press on, but it forgot to increment its position counter.
This lead to an infinite loop that eventually resulted in an out of
memory error.
---
org/postgresql/jdbc2/AbstractJdbc2Statement.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index 04c523e..6d3241d 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -3,7 +3,7 @@
* Copyright (c) 2004-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.68.2.11 2005/12/04 21:41:36 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.68.2.12 2006/02/01 18:52:41 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -850,7 +850,7 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
// go to the end of the function copying anything found
i++;
while (i<len && p_sql.charAt(i)!='}')
- newsql.append(p_sql.charAt(i));
+ newsql.append(p_sql.charAt(i++));
state = IN_SQLCODE; // end of escaped function (or query)
break;
case ESC_TIMEDATE:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list