We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30373d2 commit 4ca89dbCopy full SHA for 4ca89db
modules/imgcodecs/src/grfmt_hdr.cpp
@@ -101,10 +101,14 @@ bool HdrDecoder::readData(Mat& _img)
101
102
bool HdrDecoder::checkSignature( const String& signature ) const
103
{
104
- if(signature.size() >= m_signature.size() &&
105
- (!memcmp(signature.c_str(), m_signature.c_str(), m_signature.size()) ||
106
- !memcmp(signature.c_str(), m_signature_alt.c_str(), m_signature_alt.size())))
107
- return true;
+ if (signature.size() >= m_signature.size() &&
+ 0 == memcmp(signature.c_str(), m_signature.c_str(), m_signature.size())
+ )
+ return true;
108
+ if (signature.size() >= m_signature_alt.size() &&
109
+ 0 == memcmp(signature.c_str(), m_signature_alt.c_str(), m_signature_alt.size())
110
111
112
return false;
113
}
114
0 commit comments