Aztec: Fix padding if the last partial codeword is all one bits
ClosedPublic

Authored by vkrause on May 1 2019, 3:15 PM.

Details

Summary

Wikipedia says "after bit stuffing, the data string is padded to the next
codeword boundary by appending 1 bits. If this would result in a code word
of all ones, the last bit is changed to zero", we were missing the second
part here.

While this difference wouldn't confuse the decoder normally, it is also
fed into the Reed-Solomon encoder, and thus spread out and multiplied,
resulting in a non-decodeable image.

This is sufficiently unlikely (needs a content ending with a binary
content with enough bits set, and unfortunate alignment of the bit
stream), which is why this went unnoticed for quite a while.

Diff Detail

Repository
R280 Prison
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11408
Build 11426: arc lint + arc unit
vkrause created this revision.May 1 2019, 3:15 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 1 2019, 3:15 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
vkrause requested review of this revision.May 1 2019, 3:15 PM
svuorela accepted this revision.May 1 2019, 6:51 PM
This revision is now accepted and ready to land.May 1 2019, 6:51 PM
This revision was automatically updated to reflect the committed changes.