openbsd-ports/devel/cmake/patches/patch-Source_CPack_cmCPackTGZGenerator_cxx
espie 58e493f790 update to cmake 2.4.5, quite a few patches vanish since cmake can now
build stuff with system libraries, so we no longer have to repair
curl/zlib... just xmlrpc which cmake can't find without help.
2006-12-18 16:04:31 +00:00

13 lines
710 B
Plaintext

$OpenBSD: patch-Source_CPack_cmCPackTGZGenerator_cxx,v 1.2 2006/12/18 16:04:31 espie Exp $
--- Source/CPack/cmCPackTGZGenerator.cxx.orig Mon Dec 4 17:04:00 2006
+++ Source/CPack/cmCPackTGZGenerator.cxx Sun Dec 17 11:13:44 2006
@@ -281,7 +281,7 @@ int cmCPackTGZGenerator::GenerateHeader(
{
const int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
char header[11];
- sprintf(header, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
+ snprintf(header, sizeof header, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/,
3 /* zlib os code for UNIX, not really used anyway */);
os->write(header, 10);