Last Comment Bug 777304 - const char pointer by get() uses after destructor of NS_ConvertUTF16toUTF8()
: const char pointer by get() uses after destructor of NS_ConvertUTF16toUTF8()
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Makoto Kato [:m_kato]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-25 04:39 PDT by Makoto Kato [:m_kato]
Modified: 2012-07-27 08:56 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (3.74 KB, patch)
2012-07-25 18:39 PDT, Makoto Kato [:m_kato]
benjamin: review+
Details | Diff | Splinter Review

Description Makoto Kato [:m_kato] 2012-07-25 04:39:19 PDT
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
Comment 1 Makoto Kato [:m_kato] 2012-07-25 18:39:53 PDT
Created attachment 645990 [details] [diff] [review]
fix

Note You need to log in before you can comment on or make changes to this bug.