Closed Bug 316619 Opened 20 years ago Closed 20 years ago

txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment)doesn't init mTreeDepth

Categories

(Core :: XSLT, defect)

1.8 Branch
x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: matt, Assigned: peterv)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux 2.6.13-gentoo-r4; X11; x86_64) KHTML/3.4.3 (like Gecko) Build Identifier: mTreeDepth in not initalized in the following ctor named txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment), but it is initialized in the other ctor. As a result, valgrind correctly reports uninitialized memory reads throughout the class. To fix, add the mTreeDepth(0) line to the above ctor. Reproducible: Always
patch: Index: source/xslt/txMozillaXMLOutput.cpp =================================================================== RCS file: /cvsroot/mozilla/extensions/transformiix/source/xslt/Attic/txMozillaXMLOutput.cpp,v retrieving revision 1.61.8.1 diff -u -p -w -b -r1.61.8.1 txMozillaXMLOutput.cpp --- source/xslt/txMozillaXMLOutput.cpp 14 Sep 2005 08:18:39 -0000 1.61.8.1 +++ source/xslt/txMozillaXMLOutput.cpp 16 Nov 2005 00:17:12 -0000 @@ -115,7 +115,8 @@ txMozillaXMLOutput::txMozillaXMLOutput(c txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment) - : mBadChildLevel(0), + : mTreeDepth(0), + mBadChildLevel(0), mTableState(NORMAL), mDontAddCurrent(PR_FALSE), mHaveTitleElement(PR_FALSE),
Component: General → XSLT
Product: Firefox → Core
Summary: txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment) doesn't init mTreeDepth → txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment) doesn't init mTreeDepth
Version: unspecified → 1.0 Branch
Summary: txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment) doesn't init mTreeDepth → txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat, nsIDOMDocumentFragment* aFragment)doesn't init mTreeDepth
Version: 1.0 Branch → 1.8 Branch
Assignee: nobody → peterv
QA Contact: general → keith
Matt: can you attach your patch (Create a New Attachment) to the bug and request review (peterv, the assignee, would be a good reviewer) (cvs diff is showing the file in Attic because the file moved to mozilla/content/xslt/src/xslt/txMozillaXMLOutput.cpp on the trunk)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Fixed in bug 226425. *** This bug has been marked as a duplicate of 226425 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
No, that bug's patch caused this. I'll check this in.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Huh? Hunk #1 of attachment 194860 [details] [diff] [review] is exactly the same as the patch in comment 1.
Ah, wrong decl, oops. Ignore me :).
Attached patch v1Splinter Review
Patch that I checked in.
Attachment #203547 - Flags: superreview+
Attachment #203547 - Flags: review+
Attachment #203547 - Flags: branch-1.8.1+
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: