forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd8b0495
committed
Fix miscalculation of itemsafter in array_set_slice().
If the slice to be assigned to was before the existing array lower bound(requiring at least one null element to spring into existence to fill thegap), the code miscalculated how many entries needed to be copied fromthe old array's null bitmap. This could result in trashing the array'sdata area (as seen in bug #5840 from Karsten Loesing), or worse.This has been broken since we first allowed the behavior of assigning tonon-adjacent slices, in 8.2. Back-patch to all affected versions.1 parent051096d commitd8b0495
1 file changed
+5
-1
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2500 | 2500 |
| |
2501 | 2501 |
| |
2502 | 2502 |
| |
| 2503 | + | |
2503 | 2504 |
| |
2504 | 2505 |
| |
2505 | 2506 |
| |
| |||
2508 | 2509 |
| |
2509 | 2510 |
| |
2510 | 2511 |
| |
| 2512 | + | |
2511 | 2513 |
| |
2512 | 2514 |
| |
2513 | 2515 |
| |
2514 | 2516 |
| |
| 2517 | + | |
2515 | 2518 |
| |
2516 | 2519 |
| |
2517 | 2520 |
| |
| |||
2525 | 2528 |
| |
2526 | 2529 |
| |
2527 | 2530 |
| |
2528 |
| - | |
| 2531 | + | |
| 2532 | + | |
2529 | 2533 |
| |
2530 | 2534 |
| |
2531 | 2535 |
| |
|
0 commit comments
Comments
(0)