Skip to content

Commit 17eef4d

Browse files
committed
Merge pull request opencv#8596 from nnorwitz:nnorwitz
2 parents e60535d + 256b6bb commit 17eef4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/core/src/system.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,10 @@ void error( const Exception& exc )
859859
else
860860
{
861861
const char* errorStr = cvErrorStr(exc.code);
862-
char buf[1 << 16];
862+
char buf[1 << 12];
863863

864-
sprintf( buf, "OpenCV Error: %s (%s) in %s, file %s, line %d",
864+
snprintf( buf, sizeof(buf),
865+
"OpenCV Error: %s (%s) in %s, file %s, line %d",
865866
errorStr, exc.err.c_str(), exc.func.size() > 0 ?
866867
exc.func.c_str() : "unknown function", exc.file.c_str(), exc.line );
867868
fprintf( stderr, "%s\n", buf );

0 commit comments

Comments
 (0)