mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #22149 from seanm:sprintf
Replaced sprintf with safer snprintf * Straightforward replacement of sprintf with safer snprintf * Trickier replacement of sprintf with safer snprintf Some functions were changed to take another parameter: the size of the buffer, so that they can pass that size on to snprintf.
This commit is contained in:
@@ -1677,7 +1677,7 @@ void CvCascadeBoost::write( FileStorage &fs, const Mat& featureMap ) const
|
||||
fs << CC_WEAK_CLASSIFIERS << "[";
|
||||
for( int wi = 0; wi < weak->total; wi++)
|
||||
{
|
||||
/*sprintf( cmnt, "tree %i", wi );
|
||||
/*snprintf( cmnt, sizeof(cmnt), "tree %i", wi );
|
||||
cvWriteComment( fs, cmnt, 0 );*/
|
||||
weakTree = *((CvCascadeBoostTree**) cvGetSeqElem( weak, wi ));
|
||||
weakTree->write( fs, featureMap );
|
||||
|
||||
Reference in New Issue
Block a user