D20939: Aztec: Fix padding if the last partial codeword is all one bits
This revision was automatically updated to reflect the committed changes. Closed by commit R280:608370e85a77: Aztec: Fix padding if the last partial codeword is all one bits (authored by vkrause). REPOSITORY R280 Prison CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D20939?vs=57321=57466 REVISION DETAIL https://phabricator.kde.org/D20939 AFFECTED FILES autotests/aztecbarcodetest.cpp src/lib/aztecbarcode.cpp To: vkrause, svuorela, nicolasfella Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D20939: Aztec: Fix padding if the last partial codeword is all one bits
svuorela accepted this revision. This revision is now accepted and ready to land. REPOSITORY R280 Prison BRANCH master REVISION DETAIL https://phabricator.kde.org/D20939 To: vkrause, svuorela, nicolasfella Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D20939: Aztec: Fix padding if the last partial codeword is all one bits
vkrause added reviewers: svuorela, nicolasfella. REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D20939 To: vkrause, svuorela, nicolasfella Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D20939: Aztec: Fix padding if the last partial codeword is all one bits
vkrause created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. vkrause requested review of this revision. REVISION 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. REPOSITORY R280 Prison BRANCH master REVISION DETAIL https://phabricator.kde.org/D20939 AFFECTED FILES autotests/aztecbarcodetest.cpp src/lib/aztecbarcode.cpp To: vkrause Cc: kde-frameworks-devel, michaelh, ngraham, bruns