diff --git a/src/apps/showimage/PrintOptionsWindow.cpp b/src/apps/showimage/PrintOptionsWindow.cpp index 3fa2da6944..7516f8a1cb 100644 --- a/src/apps/showimage/PrintOptionsWindow.cpp +++ b/src/apps/showimage/PrintOptionsWindow.cpp @@ -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);