Bug #1220
Bug in exiv2 --comment on trunk
Start date:
01 Sep 2016
Due date:
% Done:
100%
Estimated time:
6.00 h
Description
$1136 rmills@rmillsmbp:~/gnu/exiv2/trunk $ cp test/data/Reagan.jpg . 1137 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg 1138 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg 1139 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg Warning: JPEG format error, rc = 5 Exiv2 exception in modify action for file Reagan.jpg: Input data does not contain a valid image 1140 rmills@rmillsmbp:~/gnu/exiv2/trunk $I believe this has been introduced by the modification to src/jpgimage.cpp/doWriteMetadata() to handle ICC profiles. I haven't totally understood the variable comPos which determined the chunk index at which to write the comment. The comment is being written to output at the wrong time and thereby corruption the chain of chunks.
Remarkably, this isn't being detected by the test suite. When I fix it, I'll add a regression detector to test/icc-test.sh.
Associated revisions
History
Updated by Robin Mills about 5 years ago
- Status changed from Assigned to Closed
- % Done changed from 20 to 100
- Estimated time changed from 3.00 h to 6.00 h
#1220 and #1074 Work in progress. Improved -pS for JPEG. #1220 is due to a bug in writing the ICC profile in jpgimage.cpp/doWriteMetadata()