forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5d2e1cc
committed
Replace some strtok() with strsep()
strtok() considers adjacent delimiters to be one delimiter, which isarguably the wrong behavior in some cases. Replace with strsep(),which has the right behavior: Adjacent delimiters create an emptytoken.Affected by this are parsing of:- Stored SCRAM secrets ("SCRAM-SHA-256$<iterations>:<salt>$<storedkey>:<serverkey>")- ICU collation attributes ("und@colStrength=primary;colCaseLevel=yes") for ICU older than version 54- PG_COLORS environment variable ("error=01;31:warning=01;35:note=01;36:locus=01")- pg_regress command-line options with comma-separated list arguments (--dbname, --create-role) (currently only used pg_regress_ecpg)Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Reviewed-by: David Steele <david@pgmasters.net>Discussion:https://www.postgresql.org/message-id/flat/79692bf9-17d3-41e6-b9c9-fc8c3944222a@eisentraut.org1 parent90c1ba5 commit5d2e1cc
File tree
4 files changed
+12
-11
lines changed- src
- backend
- libpq
- utils/adt
- common
- test/regress
4 files changed
+12
-11
lines changedLines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
608 | 608 |
| |
609 | 609 |
| |
610 | 610 |
| |
611 |
| - | |
| 611 | + | |
612 | 612 |
| |
613 |
| - | |
| 613 | + | |
614 | 614 |
| |
615 |
| - | |
| 615 | + | |
616 | 616 |
| |
617 |
| - | |
618 |
| - | |
619 |
| - | |
| 617 | + | |
620 | 618 |
| |
| 619 | + | |
621 | 620 |
| |
622 | 621 |
| |
623 | 622 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2813 | 2813 |
| |
2814 | 2814 |
| |
2815 | 2815 |
| |
| 2816 | + | |
2816 | 2817 |
| |
2817 | 2818 |
| |
2818 | 2819 |
| |
| |||
2838 | 2839 |
| |
2839 | 2840 |
| |
2840 | 2841 |
| |
2841 |
| - | |
| 2842 | + | |
2842 | 2843 |
| |
2843 | 2844 |
| |
2844 | 2845 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 |
| |
124 | 126 |
| |
125 | 127 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
234 | 234 |
| |
235 | 235 |
| |
236 | 236 |
| |
237 |
| - | |
| 237 | + | |
238 | 238 |
| |
239 |
| - | |
| 239 | + | |
240 | 240 |
| |
241 | 241 |
| |
242 |
| - | |
243 | 242 |
| |
244 | 243 |
| |
245 | 244 |
| |
|
0 commit comments
Comments
(0)