Commit 6041d38
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 2afe954 commit 6041d38
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1437 | 1444 | | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1443 | 1450 | | |
1444 | | - | |
| 1451 | + | |
| 1452 | + | |
1445 | 1453 | | |
1446 | 1454 | | |
1447 | 1455 | | |
| |||
1460 | 1468 | | |
1461 | 1469 | | |
1462 | 1470 | | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1463 | 1474 | | |
1464 | 1475 | | |
1465 | 1476 | | |
| |||
0 commit comments