Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fb269b4

Browse files
committed
From: CNT systemen BV <cntsys@cistron.nl>
I've found a problem in the Postgresql jdbc driver. "ReceiveInteger" shifts a received byte right instead of left. This means that only the least significant byte is read into the int. Reviewed by: Peter T Mount <patches@maidast.demon.co.uk>
1 parent 9cd2680 commit fb269b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/jdbc/postgresql/PG_Stream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public int ReceiveInteger(int siz) throws SQLException
156156

157157
if (b < 0)
158158
throw new IOException("EOF");
159-
n = n | (b >> (8 * i)) ;
159+
n = n | (b << (8 * i)) ;
160160
}
161161
} catch (IOException e) {
162162
throw new SQLException("Error reading from backend: " + e.toString());

0 commit comments

Comments
 (0)