Commit 112aa491 authored by Maksim Shabunin's avatar Maksim Shabunin

ExifReader::getFormat : check buffer length before accessing, fixes 6059

parent f9f53136
......@@ -245,7 +245,10 @@ void ExifReader::parseExif()
*/
Endianess_t ExifReader::getFormat() const
{
if( m_data[0] != m_data[1] )
if (m_data.size() < 1)
return NONE;
if( m_data.size() > 1 && m_data[0] != m_data[1] )
{
return NONE;
}
......
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