[libpostgresql-jdbc-java] 01/02: A bad merge of out of memory detection and zero testing resulted in incorrectly handing of null values.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_0_317
in repository libpostgresql-jdbc-java.
commit ec15099c686d49415db81100b463acdb458bd376
Author: Kris Jurka <books at ejurka.com>
Date: Tue May 23 19:21:32 2006 +0000
A bad merge of out of memory detection and zero testing resulted in
incorrectly handing of null values.
Reported by Glenn Holmer.
---
org/postgresql/core/PGStream.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/org/postgresql/core/PGStream.java b/org/postgresql/core/PGStream.java
index 877538b..e0a8ff7 100644
--- a/org/postgresql/core/PGStream.java
+++ b/org/postgresql/core/PGStream.java
@@ -3,7 +3,7 @@
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/core/PGStream.java,v 1.13.2.2 2006/04/29 00:07:10 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/core/PGStream.java,v 1.13.2.3 2006/04/29 13:31:28 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -349,7 +349,7 @@ public class PGStream
int l_msgSize = ReceiveIntegerR(4);
int i;
int l_nf = ReceiveIntegerR(2);
- byte[][] answer = new byte[l_nf][0];
+ byte[][] answer = new byte[l_nf][];
OutOfMemoryError oom = null;
for (i = 0 ; i < l_nf ; ++i)
@@ -365,7 +365,7 @@ public class PGStream
}
}
}
-
+
if (oom != null)
throw oom;
@@ -387,7 +387,7 @@ public class PGStream
{
int i, bim = (nf + 7) / 8;
byte[] bitmask = Receive(bim);
- byte[][] answer = new byte[nf][0];
+ byte[][] answer = new byte[nf][];
int whichbit = 0x80;
int whichbyte = 0;
@@ -402,9 +402,7 @@ public class PGStream
++whichbyte;
whichbit = 0x80;
}
- if (isNull)
- answer[i] = null;
- else
+ if (!isNull)
{
int len = ReceiveIntegerR(4);
if (!bin)
--
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