1
0
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:
Pavel Rojtberg
2018-01-23 11:36:30 +01:00
committed by Vadim Pisarevsky
parent 479179638e
commit 2d674fc151
3 changed files with 47 additions and 8 deletions
+1 -1
View File
@@ -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] );