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

23 lines
776 B
Plaintext

$OpenBSD: patch-contrib_src_ogl_drawn_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- contrib/src/ogl/drawn.cpp.orig Thu Dec 19 05:14:05 2002
+++ contrib/src/ogl/drawn.cpp Wed Apr 30 12:08:03 2003
@@ -40,6 +40,7 @@
static void IntToHex(unsigned int dec, char *buf);
static unsigned long HexToInt(char *buf);
extern char *oglBuffer;
+extern size_t oglBufferLength;
#define gyTYPE_PEN 40
#define gyTYPE_BRUSH 41
@@ -1146,8 +1147,8 @@ wxExpr *wxOpPolyDraw::WriteExpr(wxPseudo
// Don't overrun the buffer
if ((i*8) < 3000)
{
- strcat(oglBuffer, buf2);
- strcat(oglBuffer, buf3);
+ strlcat(oglBuffer, buf2, oglBufferLength);
+ strlcat(oglBuffer, buf3, oglBufferLength);
}
}
expr->Append(new wxExpr(wxExprString, oglBuffer));