forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite3bf3c0
committed
Fix misuse of an integer as a bool.
pgtls_read_pending is declared to return bool, but what the underlyingSSL_pending function returns is a count of available bytes.This is actually somewhat harmless if we're using C99 bools, but inthe back branches it's a live bug: if the available-bytes count happenedto be a multiple of 256, it would get converted to a zero char value.On machines where char is signed, counts of 128 and up could misbehaveas well. The net effect is that when using SSL, libpq might blockwaiting for data even though some has already been received.Broken by careless refactoring in commit4e86f1b, so back-patchto 9.5 where that came in.Per bug #15802 from David Binderman.Discussion:https://postgr.es/m/15802-f0911a97f0346526@postgresql.org1 parent7c16a2b commite3bf3c0
2 files changed
+2
-2
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1059 | 1059 |
| |
1060 | 1060 |
| |
1061 | 1061 |
| |
1062 |
| - | |
| 1062 | + | |
1063 | 1063 |
| |
1064 | 1064 |
| |
1065 | 1065 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
|
0 commit comments
Comments
(0)