Date: Mon, 27 Aug 2001 11:15:38 -0400 (EDT) From: "Alexander N. Kabaev" <ak03@gte.com> To: FreeBSD-gnats-submit@freebsd.org Cc: will@freebsd.org Subject: ports/30130: meinproc dumps core on -CURRENT + patch Message-ID: <200108271515.f7RFFcT09399@h132-197-97-45.gte.com>
next in thread | raw e-mail | index | archive | help
>Number: 30130 >Category: ports >Synopsis: meinproc dumps core on -CURRENT + patch >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 27 08:20:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Alexander N. Kabaev >Release: FreeBSD 5.0-CURRENT i386 >Organization: Verizon Information Technology >Environment: System: FreeBSD kanpc.gte.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Aug 10 13:22:27 EDT 2001 ak03@kanpc.gte.com:/usr/src/sys/i386/compile/KANPC i386 >Description: meinproc dumps core when one tries to buid KDE2 ports on -CURRENT. The following patch fixed that for me and allowed build to complete with no problems. I am not making any claims about its correctness, though, since I have no intention to build QT2 with debug symbols just to verify that. >How-To-Repeat: Build kdebase2 in -CURRENT and watch meinproc build core while processing index.doocbook file in kate subdir. >Fix: --- kdoctools/xslt.cpp.orig Mon Aug 27 11:05:50 2001 +++ kdoctools/xslt.cpp Mon Aug 27 11:08:06 2001 @@ -86,9 +86,10 @@ INFO(i18n("Reading document")); QFile xmlFile( pat ); xmlFile.open(IO_ReadOnly); - QCString contents; - contents.assign(xmlFile.readAll()); - contents.truncate(xmlFile.size()); + QByteArray contents = xmlFile.readAll(); + int fsize = xmlFile.size(); + contents.truncate(fsize + 1); + contents[fsize] = '\0'; xmlFile.close(); /* if (contents.left(5) != "<?xml") { fprintf(stderr, "xmlizer\n"); @@ -109,7 +110,7 @@ INFO(i18n("Parsing document")); xmlParserCtxtPtr ctxt = xmlCreateMemoryParserCtxt (contents.data(), - contents.length()); + contents.size()); ctxt->sax->warning = warningsFunc; int directory = pat.findRev('/'); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108271515.f7RFFcT09399>