$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);