<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: Baloo, Frameworks, astippich.<br />Herald added projects: Frameworks, Baloo.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18688">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If one has a malformed image with GPSAltitude key present, but is not rational,<br />
an attempt to convert it to rational will cause a crash. Same with GPSAltitudeRef key,<br />
(which is supposed to be a byte).</p>
<p>This fixes regression introduced in <a href="https://phabricator.kde.org/D16617" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D16617: fix extraction of GPS altitude for exif data</a> / <a href="https://phabricator.kde.org/D18010" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D18010: Fix failing test of exiv gps data</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I have a picture that causes <tt style="background: #ebebeb; font-size: 13px;">baloo_file_extractor</tt> to crash, with backtrace pointing to <tt style="background: #ebebeb; font-size: 13px;">toRational</tt> call inside <tt style="background: #ebebeb; font-size: 13px;">fetchGpsAltitude</tt>.<br />
It no longer crashes. Also, <tt style="background: #ebebeb; font-size: 13px;">ctest</tt> doesn't report any oddities here.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R286 KFileMetaData</div></div></div><br /><div><strong>BRANCH</strong><div><div>invalid-gps (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18688">https://phabricator.kde.org/D18688</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/extractors/exiv2extractor.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, Baloo, Frameworks, astippich<br /><strong>Cc: </strong>kde-frameworks-devel, Baloo, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>