mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +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:
@@ -225,7 +225,7 @@ static void saveCameraParams( const string& filename,
|
||||
|
||||
if( flags != 0 )
|
||||
{
|
||||
sprintf( buf, "flags: %s%s%s%s",
|
||||
snprintf( buf, sizeof(buf), "flags: %s%s%s%s",
|
||||
flags & CALIB_USE_INTRINSIC_GUESS ? "+use_intrinsic_guess" : "",
|
||||
flags & CALIB_FIX_ASPECT_RATIO ? "+fix_aspectRatio" : "",
|
||||
flags & CALIB_FIX_PRINCIPAL_POINT ? "+fix_principal_point" : "",
|
||||
|
||||
Reference in New Issue
Block a user