mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 13:16:32 -06:00
QRCodeEncoder::create accepted any version and any correction level, and a version outside of [0, 40] or an unknown level made the encoder read or write out of range. Check the version with CV_CheckGE and CV_CheckLE and the level with CV_Check in the constructor, so that the encoder raises an error. This is the same change and the same tests as #31042 on 4.x.