liblas/liblas_CVE-2018-20537.patch

21 lines
1.1 KiB
Diff
Raw Normal View History

diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp
--- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-06-08 11:37:26.837015849 +0200
+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.839015824 +0200
@@ -522,14 +522,14 @@ const GTIF* SpatialReference::GetGTIF()
}
if (uid == record.GetUserId(true).c_str() &&
- 34736 == record.GetRecordId())
+ 34736 == record.GetRecordId() && !data.empty())
{
int count = data.size() / sizeof(double);
ST_SetKey(m_tiff, record.GetRecordId(), count, STT_DOUBLE, &(data[0]));
}
if (uid == record.GetUserId(true).c_str() &&
- 34737 == record.GetRecordId())
+ 34737 == record.GetRecordId() && !data.empty())
{
int count = data.size()/sizeof(uint8_t);
ST_SetKey(m_tiff, record.GetRecordId(), count, STT_ASCII, &(data[0]));