Closed Bug 42384 Opened 25 years ago Closed 25 years ago

nsFilePicker.cpp deallocates buffer incorrectly

Categories

(SeaMonkey :: UI Design, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

CLOSED FIXED

People

(Reporter: law, Assigned: law)

Details

(Keywords: crash)

Attachments

(1 file)

At http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsFilePicker.cpp#178 delete[] is used to deallocate a buffer obtained via nsString::ToNewCString(). It must use nsMemory::Free. Note that the comment for nsString::ToNewCString() is erroneous; it states that one must use nsString::Recycle but that function requires an nsCString as argument.
Status: NEW → ASSIGNED
Keywords: crash
I've marked this [crash]. This is a blocker for nsbeta2+ work we're doing so this should be marked as such. Fix is already available (as attachment).
tever...?
QA Contact: sairuh → tever
This should be dup of bug 39902. This code will be fixes in bug 39902.
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
development issues, closing
Status: RESOLVED → CLOSED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: