Closed
Description
We have detected that RowReader::NarrowWideThreshold() sometimes reads beyond the data provided by view.
Steps to reproduce:
- Adapt ZXingQtReader.cpp to the following:
auto options = ReaderOptions() .setTryDownscale(false) .setTryInvert(false) .setTextMode(TextMode::HRI) .setMaxNumberOfSymbols(1);
- Add assert(view.isValid()); right to the beginning of RowReader::NarrowWideThreshold() (i.e. line 150 in ODRowReader.h)
- Build ZXingQtReader and run it with the attached image
- The assert is fired when ITFReader::decodePattern() is called with rowNumber=1560. Then next._size is 4, next._end-next._data is 12, and thus next.subView(4, 10) creates a view extending 2 bytes beyond next._end.
Metadata
Metadata
Assignees
Labels
No labels