mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
persistence: replace arbitrary limit of cn to 4 by CV_CN_MAX (#10636)
* persistence: replace arbitrary limit of cn to 4 by CV_CN_MAX * python: added persistence test, remove temp files * fixup! python: added persistence test, remove temp files * fixup! python: added persistence test, remove temp files
This commit is contained in:
committed by
Vadim Pisarevsky
parent
479179638e
commit
2d674fc151
@@ -4781,7 +4781,7 @@ icvDecodeSimpleFormat( const char* dt )
|
||||
int fmt_pairs[CV_FS_MAX_FMT_PAIRS], fmt_pair_count;
|
||||
|
||||
fmt_pair_count = icvDecodeFormat( dt, fmt_pairs, CV_FS_MAX_FMT_PAIRS );
|
||||
if( fmt_pair_count != 1 || fmt_pairs[0] > 4 )
|
||||
if( fmt_pair_count != 1 || fmt_pairs[0] >= CV_CN_MAX)
|
||||
CV_Error( CV_StsError, "Too complex format for the matrix" );
|
||||
|
||||
elem_type = CV_MAKETYPE( fmt_pairs[1], fmt_pairs[0] );
|
||||
|
||||
Reference in New Issue
Block a user