]> 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)
commit59fa0195c4a735fe2e5a51c4bcc8fde33aef6325
treee446e804ad5ebc5e1e2c87b3fa320b38ceae9e18
parent3d5b227bae4addf9509cb0b2255dcef317dbe64f
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