Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid 2 more RSS Expanded finder pattern false positive scenarios #1692

Merged

Conversation

gredler
Copy link
Contributor

@gredler gredler commented Sep 15, 2023

This PR addresses 2 additional finder pattern false positive scenarios found during fuzz testing Okapi encode + ZXing decode of RSS Expanded (DataBar Expanded).

First, a finder pattern false positive can easily lead to an error decoding the data character to the left of the finder pattern. When this happens, it is better to continue searching for the real finder pattern, instead of giving up completely.

Second, we can detect additional false positives by relying on the mathematical relationship between the widths of the finder patterns and the space between them, making sure that the position of the finder pattern is somewhat near where we would expect to find it, relative to the previous finder pattern.

This PR includes two additional test cases, one for each scenario addressed.

@srowen srowen added this to the 3.5.3 milestone Sep 15, 2023
@srowen srowen merged commit 465753a into zxing:master Sep 15, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants