openbsd-ports/x11/wxWidgets/patches/patch-src_html_helpfrm_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

14 lines
639 B
Plaintext

$OpenBSD: patch-src_html_helpfrm_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- src/html/helpfrm.cpp.orig Mon Dec 16 23:56:32 2002
+++ src/html/helpfrm.cpp Wed Apr 30 09:50:13 2003
@@ -1385,8 +1385,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxComm
int displ = 0;
for (int i = 0; i < cnt; i++)
{
- wxStrncpy(mybuff, index[i].m_Name, 512);
- mybuff[511] = _T('\0');
+ strlcpy(mybuff, index[i].m_Name, sizeof(mybuff));
for (ptr = mybuff; *ptr != 0; ptr++)
if (*ptr >= _T('A') && *ptr <= _T('Z'))
*ptr -= (wxChar)(_T('A') - _T('a'));