Open khoaphamce opened 4 months ago
Current code does not deal with non-aligned remains correctly, so you may prepare a pull request.
Current code does not deal with non-aligned remains correctly, so you may prepare a pull request.
I created the PR: https://github.com/mchehab/zbar/pull/295 , please help check it out. Thanks.
Hi authors, this issue I found is CRITICAL, please take some time and make quick response to enhance reliability.
I found the potential bug from _zbar_image_copy function in zbar/image.h (line 158 -> 172):
The for loop to
/* Deal with non-aligned remains, if any */
will never be executed since the loop above/* Do it word per word, in order to speedup */
make an additional ofi += sizeof(long)
right before exit the loop, this will result ini >= len
in every situation. The loop to/* Deal with non-aligned remains, if any */
will never run because of the described behaviour.May I create a PR to fix this ?
Thank you.