]> granicus.if.org Git - postgresql/commit
Fix crash in close_ps() for NaN input coordinates.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jul 2016 18:42:37 +0000 (14:42 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jul 2016 18:42:37 +0000 (14:42 -0400)
commit278148907a971ec7fa4ffb24248103d8012155d2
tree2bcb434442e929e5600c9f9e02dfcea9c565f4b1
parent745513c70282180afd83c666e43bdb0b6fb8c688
Fix crash in close_ps() for NaN input coordinates.

The Assert() here seems unreasonably optimistic.  Andreas Seltenreich
found that it could fail with NaNs in the input geometries, and it
seems likely to me that it might fail in corner cases due to roundoff
error, even for ordinary input values.  As a band-aid, make the function
return SQL NULL instead of crashing.

Report: <87d1md1xji.fsf@credativ.de>
src/backend/utils/adt/geo_ops.c