[libpostgresql-jdbc-java] 13/22: Fix the previous fix for handling parameters with an embedded null. The code was vulnerable to a NPE because it ignored the carefully setup local variable for standardConformingStrings.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_4_702
in repository libpostgresql-jdbc-java.

commit bc935cbd9fff590813f86d5bd5defee8ef906578
Author: Kris Jurka <books at ejurka.com>
Date:   Sun Mar 21 07:07:50 2010 +0000

    Fix the previous fix for handling parameters with an embedded null.
    The code was vulnerable to a NPE because it ignored the carefully
    setup local variable for standardConformingStrings.
    
    Pierre Queinnec
---
 org/postgresql/core/v3/SimpleParameterList.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/core/v3/SimpleParameterList.java b/org/postgresql/core/v3/SimpleParameterList.java
index 44084d7..d9ab1a2 100644
--- a/org/postgresql/core/v3/SimpleParameterList.java
+++ b/org/postgresql/core/v3/SimpleParameterList.java
@@ -4,7 +4,7 @@
 * Copyright (c) 2004, Open Cloud Limited.
 *
 * IDENTIFICATION
-*   $PostgreSQL: pgjdbc/org/postgresql/core/v3/SimpleParameterList.java,v 1.17 2008/09/30 23:41:23 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/core/v3/SimpleParameterList.java,v 1.17.2.1 2010/02/04 00:48:54 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -155,7 +155,7 @@ class SimpleParameterList implements V3ParameterList {
 
             p.append('\'');
             try {
-                p = Utils.appendEscapedLiteral(p, param, protoConnection.getStandardConformingStrings());
+                p = Utils.appendEscapedLiteral(p, param, standardConformingStrings);
             } catch (SQLException sqle) {
                 // This should only happen if we have an embedded null
                 // and there's not much we can do if we do hit one.

-- 
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