openbsd-ports/x11/wxWidgets/patches/patch-src_generic_gridg_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
530 B
Plaintext

$OpenBSD: patch-src_generic_gridg_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- src/generic/gridg.cpp.orig Sat Sep 7 00:42:47 2002
+++ src/generic/gridg.cpp Wed Apr 30 13:00:20 2003
@@ -1585,8 +1585,8 @@ void wxGenericGrid::OnChangeLabels()
for (j = 0; j < noTimes; j++)
{
char buf2[20];
- sprintf(buf2, wxT("%c"), (char)ch);
- strcat(buf, buf2);
+ snprintf(buf2, sizeof(buf2), wxT("%c"), (char)ch);
+ strlcat(buf, buf2, sizeof(buf));
}
SetLabelValue(wxHORIZONTAL, buf, i);
}