16 lines
566 B
Plaintext
16 lines
566 B
Plaintext
$OpenBSD: patch-src_lineNumbers_cpp,v 1.2 2001/05/25 17:02:03 lebel Exp $
|
|
|
|
changes sprintf -> snprintf to close potential buffer overrun
|
|
|
|
--- src/lineNumbers.cpp.orig Thu May 24 00:40:20 2001
|
|
+++ src/lineNumbers.cpp Thu May 24 14:40:36 2001
|
|
@@ -119,7 +119,7 @@ void XxLineNumbers::drawContents( QPaint
|
|
std::min( displayLines, diffs->getNbLines() - (topLine - 1) );
|
|
|
|
char lnFormat[16];
|
|
- sprintf( lnFormat, "%%%dd", _app->getMaxDigits() );
|
|
+ snprintf( lnFormat, sizeof(lnFormat), "%%%dd", _app->getMaxDigits() );
|
|
|
|
const int x = 0;
|
|
int y = 0;
|