fix(wechat_qrcode): Init nBytes after the count value is determined (#3480)
authorNano <nanoapezlk@gmail.com>
Wed, 26 Apr 2023 07:09:52 +0000 (15:09 +0800)
committerBenjamin Drung <bdrung@debian.org>
Thu, 29 Feb 2024 03:07:04 +0000 (03:07 +0000)
commitabcd9b56ecf7f3847d5d49f2ac0364f9a53ccfc0
tree42151f0d5e7d3d16b8ebf040c56e2383c3ebf441
parente910983a85275266333faf658ef4adbb41178c47
fix(wechat_qrcode): Init nBytes after the count value is determined (#3480)

* fix(wechat_qrcode): Initialize nBytes after the count value is determined

* fix(wechat_qrcode): Incorrect count data repair

* chore: format expr

* fix(wechat_qrcode): Avoid null pointer exception

* fix(wechat_qrcode): return when bytes_ is empty

* test(wechat_qrcode): add test case

---------

Co-authored-by: GZTime <Time.GZ@outlook.com>
Gbp-Pq: Name 0009-fix-wechat_qrcode-Init-nBytes-after-the-count-value-.patch
contrib/modules/wechat_qrcode/src/zxing/qrcode/decoder/decoded_bit_stream_parser.cpp
contrib/modules/wechat_qrcode/test/test_qrcode.cpp