mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Check for nullptr in call to properties, fixes segfault. (#106)
* Added -fPIE as g++ 9.4.0 complained and would not link * Prevent crash by checking for properties before dereferencing. --------- Co-authored-by: Tim Finer <finert@pixia.com>
This commit is contained in:
+1
-1
@@ -151,7 +151,7 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
|
||||
|
||||
// assume tabular schema with columns in header
|
||||
size_t p_pos = 0;
|
||||
while (p_pos < feature->properties()->size()) {
|
||||
while (feature->properties() && p_pos < feature->properties()->size()) {
|
||||
uint16_t col_idx;
|
||||
memcpy(&col_idx, feature->properties()->data() + p_pos, sizeof(col_idx));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user