1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #12570 from alalek:drop_usrtype1

* core: drop usage of CV_USRTYPE1 in OpenCV

avoid OpenCV crashes due size change CV_ELEM_SIZE(CV_USRTYPE1): 8 -> 2

* ! fix persistence internal types
This commit is contained in:
Alexander Alekhin
2018-09-19 13:55:26 +03:00
committed by GitHub
parent 861415133e
commit 5fb0f34e8a
13 changed files with 141 additions and 112 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ cvCreateSeq( int seq_flags, size_t header_size, size_t elem_size, CvMemStorage*
int elemtype = CV_MAT_TYPE(seq_flags);
int typesize = CV_ELEM_SIZE(elemtype);
if( elemtype != CV_SEQ_ELTYPE_GENERIC && elemtype != CV_USRTYPE1 &&
if( elemtype != CV_SEQ_ELTYPE_GENERIC && elemtype != CV_SEQ_ELTYPE_PTR &&
typesize != 0 && typesize != (int)elem_size )
CV_Error( CV_StsBadSize,
"Specified element size doesn't match to the size of the specified element type "