Segfault on opening TIFFs with empty Make and Model tags, issue 2713

This commit is contained in:
DrSlony
2015-03-15 16:36:48 +01:00
parent 4fbd3af156
commit 5a80715b5c

View File

@@ -128,7 +128,8 @@ void ImageData::extractInfo () {
}
make.erase( make.find_last_not_of(' ')+1 );
}
if (root->getTag ("Model")){
if (root->getTag ("Model"))
if( !(model.size()==0)) {
model = root->getTag ("Model")->valueToString ();
std::size_t i=0;
if ( make.find("KODAK") != std::string::npos ){
@@ -147,6 +148,9 @@ void ImageData::extractInfo () {
if( model.find( "Digital Camera ") != std::string::npos )
model.erase(0,15);
}
else {
model = "Unknown";
}
if (root->getTag ("Orientation")){
orientation = root->getTag ("Orientation")->valueToString ();
}