cosmoscout / cosmoscout-vr

:milky_way: A virtual universe which lets you explore, analyze and present huge planetary datasets and large simulation data in real-time.
Other
347 stars 27 forks source link

:wrench: Add error handling for TIFF functions #342

Closed PdlAyush closed 1 year ago

PdlAyush commented 1 year ago

There are some scenarios where the error handling in (lines 69-76) is unable to detect and remove corrupt .tiff files in the map-cache directory. I was able to create one such scenario by:

The corrupt .tiff file wouldn't be removed. So the return of TIFFGetField() and TIFFReadScanline() is checked to remove such corrupt .tiff files.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4784801538


Changes Missing Coverage Covered Lines Changed/Added Lines %
plugins/csp-lod-bodies/src/TileSourceWebMapService.cpp 0 11 0.0%
<!-- Total: 0 11 0.0% -->
Files with Coverage Reduction New Missed Lines %
plugins/csp-lod-bodies/src/TileSourceWebMapService.cpp 1 0%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 4700956288: -0.0005%
Covered Lines: 193
Relevant Lines: 16920

💛 - Coveralls
PdlAyush commented 1 year ago

Thank you for your feedback, sorry for the two commits, the latest commit is absolutely not needed as I am just using TIFFGetField() twice. Could you please only merge upto commit - 8bee368.

Schneegans commented 1 year ago

Thank you for implementing the changes. I think I cannot easily choose which commits to merge. Please undo the changes of that commit with a new commit. I'll will then squash-merghe this in the end.

Also, it would be great if you could add a note to the changelog for this bug fix (under "Bug Fixes" for the upcoming v1.8.0).