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:
Ryan Leavengood
2010-12-29 04:00:25 +00:00
parent 7f6caa088c
commit 7058291b1a
+1 -1
View File
@@ -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);