]> 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)
commit608cc0c413d8bafc853065f80c3b05f84493032a
treee46521c5a3b7c2210140bdab9582867a97c9819f
parent37276017fba88b7c7557395e2fcdaa4a61ba49ac
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