forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit78bf0a2
committed
hstore: Tighten key/value parsing check for whitespaces
isspace() can be locale-sensitive depending on the platform, causinghstore to consider as whitespaces characters it should not see as such.For example, U+0105, being decoded as 0xC4 0x85 in UTF-8, would bediscarded from the input given.This problem is similar to9ae2661, though it was missed that hstorecan also manipulate non-ASCII inputs, so replace the existing isspace()calls with scanner_isspace().This problem exists for a long time, so backpatch all the way down.Author: Evan JonesDiscussion:https://postgr.es/m/CA+HWA9awUW0+RV_gO9r1ABZwGoZxPztcJxPy8vMFSTbTfi4jig@mail.gmail.comBackpatch-through: 111 parent37236ca commit78bf0a2
File tree
5 files changed
+69
-5
lines changed- contrib/hstore
- expected
- sql
5 files changed
+69
-5
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| |||
86 | 87 |
| |
87 | 88 |
| |
88 | 89 |
| |
89 |
| - | |
| 90 | + | |
90 | 91 |
| |
91 | 92 |
| |
92 | 93 |
| |
| |||
109 | 110 |
| |
110 | 111 |
| |
111 | 112 |
| |
112 |
| - | |
| 113 | + | |
113 | 114 |
| |
114 | 115 |
| |
115 | 116 |
| |
| |||
217 | 218 |
| |
218 | 219 |
| |
219 | 220 |
| |
220 |
| - | |
| 221 | + | |
221 | 222 |
| |
222 | 223 |
| |
223 | 224 |
| |
| |||
265 | 266 |
| |
266 | 267 |
| |
267 | 268 |
| |
268 |
| - | |
| 269 | + | |
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + |
0 commit comments
Comments
(0)