From 6ef622553acd6893da2b1a098b33428d346b5c54 Mon Sep 17 00:00:00 2001 From: Robert Coup Date: Thu, 7 Nov 2024 22:47:13 +0000 Subject: [PATCH] Fix ST_Read_Meta() type mismatch errors on Linux. This is caused by an uninitialized EOF variable in the GDAL file handler, which if EOF is checked before a seek, leads to an intermittent SQL Type Mismatch error in release builds, and a runtime error crash in debug builds. --- spatial/src/spatial/gdal/file_handler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spatial/src/spatial/gdal/file_handler.cpp b/spatial/src/spatial/gdal/file_handler.cpp index 2111de0..bde8661 100644 --- a/spatial/src/spatial/gdal/file_handler.cpp +++ b/spatial/src/spatial/gdal/file_handler.cpp @@ -24,7 +24,7 @@ class DuckDBFileHandle : public VSIVirtualHandle { bool is_eof; public: - explicit DuckDBFileHandle(unique_ptr file_handle_p) : file_handle(std::move(file_handle_p)) { + explicit DuckDBFileHandle(unique_ptr file_handle_p) : file_handle(std::move(file_handle_p)), is_eof(false) { } vsi_l_offset Tell() override {