forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit71e985a
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 parent1a93588 commit71e985a
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 | |
---|---|---|---|
| |||
2198 | 2198 |
| |
2199 | 2199 |
| |
2200 | 2200 |
| |
2201 |
| - | |
| 2201 | + | |
2202 | 2202 |
| |
2203 |
| - | |
| 2203 | + | |
| 2204 | + | |
2204 | 2205 |
| |
2205 | 2206 |
| |
2206 |
| - | |
2207 |
| - | |
2208 |
| - | |
2209 |
| - | |
2210 |
| - | |
2211 |
| - | |
2212 |
| - | |
2213 | 2207 |
| |
2214 | 2208 |
| |
2215 | 2209 |
| |
|
0 commit comments
Comments
(0)