forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd566ad3
committed
Fix string truncation to be multibyte-aware in text_name and bpchar_name.
Previously, casts to name could generate invalidly-encoded results.Also, make these functions match namein() more exactly, by consistentlyusing palloc0() instead of ad-hoc zeroing code.Back-patch to all supported branches.Karl Schnaitter and Tom Lane1 parent965d76f commitd566ad3
3 files changed
+14
-22
lines changedLines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 |
| - | |
| 49 | + | |
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
54 | 53 |
| |
55 |
| - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 |
| |
57 | 61 |
| |
58 | 62 |
| |
|
Lines changed: 4 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
374 |
| - | |
| 374 | + | |
375 | 375 |
| |
376 |
| - | |
| 376 | + | |
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
| |||
383 | 383 |
| |
384 | 384 |
| |
385 | 385 |
| |
386 |
| - | |
| 386 | + | |
| 387 | + | |
387 | 388 |
| |
388 | 389 |
| |
389 |
| - | |
390 |
| - | |
391 |
| - | |
392 |
| - | |
393 |
| - | |
394 |
| - | |
395 |
| - | |
396 | 390 |
| |
397 | 391 |
| |
398 | 392 |
| |
|
Lines changed: 3 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2145 | 2145 |
| |
2146 | 2146 |
| |
2147 | 2147 |
| |
2148 |
| - | |
| 2148 | + | |
2149 | 2149 |
| |
2150 |
| - | |
| 2150 | + | |
| 2151 | + | |
2151 | 2152 |
| |
2152 | 2153 |
| |
2153 |
| - | |
2154 |
| - | |
2155 |
| - | |
2156 |
| - | |
2157 |
| - | |
2158 |
| - | |
2159 |
| - | |
2160 | 2154 |
| |
2161 | 2155 |
| |
2162 | 2156 |
| |
|
0 commit comments
Comments
(0)