const char pointer by get() uses after destructor of NS_ConvertUTF16toUTF8()

RESOLVED FIXED in mozilla17

Status

()

Core
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: m_kato, Assigned: m_kato)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
const char* path = NS_ConvertUTF16toUTF8(str).get() means

NS_ConvertUTF16toUTF8 xxxx(str);
const char *path = xxxx.get();
delete xxxxx.

So path is already free when using it.


There is invalid usages in the following codes.

content/media/webrtc/MediaEngineWebRTCVideo.cpp
dom/bluetooth/linux/BluetoothDBusService.cpp
widget/android/AndroidGraphicBuffer.cpp
(Assignee)

Comment 1

5 years ago
Created attachment 645990 [details] [diff] [review]
fix
Attachment #645990 - Flags: review?(benjamin)

Updated

5 years ago
Attachment #645990 - Flags: review?(benjamin) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5fe4c57fb73e
Target Milestone: --- → mozilla17
https://hg.mozilla.org/mozilla-central/rev/5fe4c57fb73e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.