CID 6924: Use safe coding practices to avoid buffer overflow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -225,7 +225,7 @@ PrintOptionsWindow::SetValue(BTextControl* text, float value)
|
||||
{
|
||||
BMessage* msg;
|
||||
char s[80];
|
||||
sprintf(s, "%0.0f", value);
|
||||
snprintf(s, sizeof(s), "%0.0f", value);
|
||||
// prevent sending a notification when text is set
|
||||
msg = new BMessage(*text->ModificationMessage());
|
||||
text->SetModificationMessage(NULL);
|
||||
|
||||
Reference in New Issue
Block a user