diff --git a/src/wkb.cpp b/src/wkb.cpp index cfc07530c..f7d9692f3 100644 --- a/src/wkb.cpp +++ b/src/wkb.cpp @@ -76,7 +76,7 @@ public: // try to determine WKB format automatically if (format_ == wkbAuto) { - if (size >= 44 + if (size_ >= 44 && (unsigned char)(wkb_[0]) == (unsigned char)(0x00) && (unsigned char)(wkb_[38]) == (unsigned char)(0x7C)) {