Commit e66197f
committed
plperl: Correctly handle empty arrays in plperl_ref_from_pg_array.
plperl_ref_from_pg_array() didn't consider the case that postgrs arrays
can have 0 dimensions (when they're empty) and accessed the first
dimension without a check. Fix that by special casing the empty array
case.
Author: Alex Hunsaker
Reported-By: Andres Freund / valgrind / buildfarm animal skink
Discussion: 20160308063240.usnzg6bsbjrne667@alap3.anarazel.de
Backpatch: 9.1-1 parent 8c314b9 commit e66197f
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1450 | 1450 | | |
1451 | 1451 | | |
1452 | 1452 | | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
1456 | 1463 | | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
1462 | 1469 | | |
1463 | | - | |
| 1470 | + | |
| 1471 | + | |
1464 | 1472 | | |
1465 | 1473 | | |
1466 | 1474 | | |
| |||
1479 | 1487 | | |
1480 | 1488 | | |
1481 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1482 | 1493 | | |
1483 | 1494 | | |
1484 | 1495 | | |
| |||
0 commit comments