Commit 91323549 authored by Maksim Shabunin's avatar Maksim Shabunin

Merge pull request #9906 from sturkmen72:fix_grfmt_gdal

parents cca99bf8 d1c5e79e
......@@ -562,7 +562,6 @@ ImageDecoder GdalDecoder::newDecoder()const{
*/
bool GdalDecoder::checkSignature( const String& signature )const{
// look for NITF
std::string str(signature);
if( str.substr(0,4).find("NITF") != std::string::npos ){
......@@ -570,7 +569,7 @@ bool GdalDecoder::checkSignature( const String& signature )const{
}
// look for DTED
if( str.substr(140,4) == "DTED" ){
if( str.size() > 144 && str.substr(140,4) == "DTED" ){
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment