From: Elena Shipunova Date: Mon, 7 Sep 2015 10:50:30 +0000 (+0300) Subject: do not proceed with removing zero-length slice X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~68^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7b471f10f41bfbb63309bce7378582f220e1593;p=platform%2Fupstream%2Fopencv.git do not proceed with removing zero-length slice (cherry picked from commit 036c3b4e6d45dcf81181bb2658601f758c976088) --- diff --git a/modules/core/src/datastructs.cpp b/modules/core/src/datastructs.cpp index ddadd39..3e0bf47 100644 --- a/modules/core/src/datastructs.cpp +++ b/modules/core/src/datastructs.cpp @@ -1689,6 +1689,9 @@ cvSeqRemoveSlice( CvSeq* seq, CvSlice slice ) slice.end_index = slice.start_index + length; + if ( slice.start_index == slice.end_index ) + return; + if( slice.end_index < total ) { CvSeqReader reader_to, reader_from;