[postgis-tickets] r16866 - Fix undefined behaviour in SADFWrite
Raul
raul at rmr.ninja
Tue Oct 2 02:48:22 PDT 2018
Author: algunenano
Date: 2018-10-02 02:48:21 -0700 (Tue, 02 Oct 2018)
New Revision: 16866
Modified:
branches/2.2/NEWS
branches/2.2/loader/safileio.c
Log:
Fix undefined behaviour in SADFWrite
References #4189
Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS 2018-10-02 09:45:39 UTC (rev 16865)
+++ branches/2.2/NEWS 2018-10-02 09:48:21 UTC (rev 16866)
@@ -4,6 +4,7 @@
* Bug Fixes *
- #2985, Avoid array overflow in ANALYZE (Paul Ramsey)
- #4160, Use qualified names in topology extension install (Raúl Marín)
+ - #4189, Fix undefined behaviour in SADFWrite (Raúl Marín)
PostGIS 2.2.7
2018/04/06
Modified: branches/2.2/loader/safileio.c
===================================================================
--- branches/2.2/loader/safileio.c 2018-10-02 09:45:39 UTC (rev 16865)
+++ branches/2.2/loader/safileio.c 2018-10-02 09:48:21 UTC (rev 16866)
@@ -115,6 +115,7 @@
SAOffset SADFWrite( void *p, SAOffset size, SAOffset nmemb, SAFile file )
{
+ if (!nmemb || !p) return 0;
return (SAOffset) fwrite( p, (size_t) size, (size_t) nmemb,
(FILE *) file );
}
More information about the postgis-tickets
mailing list