[libpostgresql-jdbc-java] 01/06: Deep inside the driver's underlying IO code there is a method to skip over incoming data and discard it. It returns the length of data actually skipped which may differ from the requested skip size. It was incorrectly calculating the total length skipped when it had some data buffered, but also needed to skip over some data it had yet to read. This bug does not affect any existing code because all current callers of skip ensure that enough data is buffered, so the skip can always be satisfied from the internal buffer alone.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_2_508
in repository libpostgresql-jdbc-java.
commit 9b976f3682dd1171628ab22efdc9198415066c97
Author: Kris Jurka <books at ejurka.com>
Date: Sat Dec 15 15:32:47 2007 +0000
Deep inside the driver's underlying IO code there is a method to skip
over incoming data and discard it. It returns the length of data
actually skipped which may differ from the requested skip size. It
was incorrectly calculating the total length skipped when it had some
data buffered, but also needed to skip over some data it had yet to
read. This bug does not affect any existing code because all current
callers of skip ensure that enough data is buffered, so the skip can
always be satisfied from the internal buffer alone.
---
org/postgresql/core/VisibleBufferedInputStream.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org/postgresql/core/VisibleBufferedInputStream.java b/org/postgresql/core/VisibleBufferedInputStream.java
index a706dbd..e6447a7 100644
--- a/org/postgresql/core/VisibleBufferedInputStream.java
+++ b/org/postgresql/core/VisibleBufferedInputStream.java
@@ -230,7 +230,7 @@ public class VisibleBufferedInputStream extends InputStream {
n -= avail;
index = 0;
endIndex = 0;
- return wrapped.skip(n);
+ return avail + wrapped.skip(n);
}
/**
--
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