- Notifications
You must be signed in to change notification settings - Fork28
Commitd3b97d1
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 parent73cc7d3 commitd3b97d1
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 | |
---|---|---|---|
| |||
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
375 |
| - | |
| 375 | + | |
376 | 376 |
| |
377 |
| - | |
| 377 | + | |
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
387 |
| - | |
| 387 | + | |
| 388 | + | |
388 | 389 |
| |
389 | 390 |
| |
390 |
| - | |
391 |
| - | |
392 |
| - | |
393 |
| - | |
394 |
| - | |
395 |
| - | |
396 |
| - | |
397 | 391 |
| |
398 | 392 |
| |
399 | 393 |
| |
|
Lines changed: 3 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2256 | 2256 |
| |
2257 | 2257 |
| |
2258 | 2258 |
| |
2259 |
| - | |
| 2259 | + | |
2260 | 2260 |
| |
2261 |
| - | |
| 2261 | + | |
| 2262 | + | |
2262 | 2263 |
| |
2263 | 2264 |
| |
2264 |
| - | |
2265 |
| - | |
2266 |
| - | |
2267 |
| - | |
2268 |
| - | |
2269 |
| - | |
2270 |
| - | |
2271 | 2265 |
| |
2272 | 2266 |
| |
2273 | 2267 |
| |
|
0 commit comments
Comments
(0)