mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #9906 from sturkmen72:fix_grfmt_gdal
This commit is contained in:
commit
91323549f4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user