···11-Simple bounds checks for CVE-2023-40889, based on third-party
22-fix by Remi Meier @
33-https://github.com/Raemi/zbar/commit/5e8acc6974f17e56c3ddaa5509870beb8d7a599c
44-55---- a/zbar/qrcode/qrdec.c
66-+++ b/zbar/qrcode/qrdec.c
77-@@ -3900,8 +3900,8 @@ void qr_reader_match_centers(qr_reader *_reader,qr_code_data_list *_qrlist,
88- /*TODO: We might be able to accelerate this step significantly by
99- considering the remaining finder centers in a more intelligent order,
1010- based on the first finder center we just chose.*/
1111-- for(j=i+1;!mark[i]&&j<_ncenters;j++){
1212-- for(k=j+1;!mark[j]&&k<_ncenters;k++)if(!mark[k]){
1313-+ for(j=i+1; i < _ncenters && !mark[i]&&j<_ncenters;j++){
1414-+ for(k=j+1; j < _ncenters && !mark[j]&&k<_ncenters;k++)if(!mark[k]){
1515- qr_finder_center *c[3];
1616- qr_code_data qrdata;
1717- int version;