openbsd-ports/x11/wxWidgets/patches/patch-demos_poem_wxpoem_cpp
todd b25888b419 wxWidgets 2.4.2, C++ cross-platform GUI toolkit
www: http://www.wxwidgets.org/

from Andrew Dalgleish   < openbsd at ajd dot net dot au >
many thanks for much persistence!
2004-07-16 21:01:35 +00:00

15 lines
639 B
Plaintext

$OpenBSD: patch-demos_poem_wxpoem_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- demos/poem/wxpoem.cpp.orig Tue May 14 23:53:48 2002
+++ demos/poem/wxpoem.cpp Wed Apr 30 12:12:42 2003
@@ -284,8 +284,8 @@ void MainWindow::ScanBuffer(wxDC *dc, bo
dc->SetFont(* BoldFont);
line_ptr = line+3;
- strcpy(title, line_ptr);
- strcat(title, " (cont'd)");
+ strlcpy(title, line_ptr, sizeof(title));
+ strlcat(title, " (cont'd)", sizeof(title));
dc->GetTextExtent(line_ptr, &xx, &yy);
FindMax(&curr_width, (int)xx);