forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9e10898
committed
Fix corner case with PGP decompression in pgcrypto
A compressed stream may end with an empty packet, and PGP decompressionfinished before reading this empty packet in the remaining stream. Thiscaused a failure in pgcrypto, handling this case as corrupted data.This commit makes sure to consume such extra data, avoiding a failurewhen decompression the entire stream. This corner case was reproduciblewith a data length of 16kB, and existed since its introduction ine94dd6a. A cheap regression test is added to cover this case.Thanks to Jeff Janes for the extra investigation.Reported-by: Frank GagnepainAuthor: Kyotaro Horiguchi, Michael PaquierDiscussion:https://postgr.es/m/16476-692ef7b84e5fb893@postgresql.orgBackpatch-through: 9.51 parenta507387 commit9e10898
File tree
3 files changed
+62
-11
lines changed- contrib/pgcrypto
- expected
- sql
3 files changed
+62
-11
lines changedLines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + |
Lines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
246 | 257 |
| |
247 | 258 |
| |
248 | 259 |
| |
| |||
256 | 267 |
| |
257 | 268 |
| |
258 | 269 |
| |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + |
0 commit comments
Comments
(0)