From 49151ede49efd13d4ae5110fb5c0c0678e4e4bd3 Mon Sep 17 00:00:00 2001 From: skrll Date: Mon, 10 Dec 2001 10:02:53 +0000 Subject: Be more careful when using QCString in meinproc... This avoids at least on SEGV I've seen still looking for the others. --- x11/kdelibs2/distinfo | 3 ++- x11/kdelibs2/patches/patch-bs | 50 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 x11/kdelibs2/patches/patch-bs diff --git a/x11/kdelibs2/distinfo b/x11/kdelibs2/distinfo index 8b9f812f6ff..9056cddd5d5 100644 --- a/x11/kdelibs2/distinfo +++ b/x11/kdelibs2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2001/12/04 11:06:05 skrll Exp $ +$NetBSD: distinfo,v 1.12 2001/12/10 10:02:53 skrll Exp $ SHA1 (kdelibs-2.2.2.tar.bz2) = 6ae1096ffb547f317adca6b29cb9ce9dcaf1863c Size (kdelibs-2.2.2.tar.bz2) = 5955592 bytes @@ -46,4 +46,5 @@ SHA1 (patch-bo) = 50c88a7ca572409a7f91df075155a1705a7ebca2 SHA1 (patch-bp) = 84fe12d8317bbc9eb0ea2f2d320d3fb9fb138faf SHA1 (patch-bq) = 37b760bcd4067d3adac6260377f16fcb6ffae909 SHA1 (patch-br) = e4098450a416d419a8ac947ad7a2244298c2c011 +SHA1 (patch-bs) = 77b183070cc758feff760ffc44044eb2a6cd5005 SHA1 (patch-bt) = 96a5b587056abc922957e55898e222910ab98dca diff --git a/x11/kdelibs2/patches/patch-bs b/x11/kdelibs2/patches/patch-bs new file mode 100644 index 00000000000..3b8ba79d928 --- /dev/null +++ b/x11/kdelibs2/patches/patch-bs @@ -0,0 +1,50 @@ +$NetBSD: patch-bs,v 1.3 2001/12/10 10:02:53 skrll Exp $ + +--- kdoctools/xslt.cpp.orig Sat Dec 8 16:39:55 2001 ++++ kdoctools/xslt.cpp +@@ -51,18 +51,18 @@ + + va_list args; + +- char buffer[50000]; ++#define WF_BUFSIZE 50000 ++ char buffer[WF_BUFSIZE]; + buffer[0] = 0; + + if (input->filename) { +- sprintf(&buffer[strlen(buffer)], "%s:%d: ", input->filename, +- input->line); ++ snprintf(buffer, WF_BUFSIZE, "%s:%d: ", input->filename, input->line); + } else { +- sprintf(&buffer[strlen(buffer)], "Entity: line %d: ", input->line); ++ snprintf(buffer, WF_BUFSIZE, "Entity: line %d: ", input->line); + } + + va_start(args, msg); +- vsprintf(&buffer[strlen(buffer)], msg, args); ++ vsnprintf(&buffer[strlen(buffer)], WF_BUFSIZE, msg, args); + va_end(args); + + fprintf( stderr, "%s", buffer ); +@@ -88,9 +90,10 @@ + INFO(i18n("Reading document")); + QFile xmlFile( pat ); + xmlFile.open(IO_ReadOnly); ++ ++ int len = xmlFile.size(); + QCString contents; + contents.assign(xmlFile.readAll()); +- contents.truncate(xmlFile.size()); + xmlFile.close(); + /* if (contents.left(5) != "sax->warning = warningsFunc; + + int directory = pat.findRev('/'); -- cgit v1.2.3