bad ownership model for allProperties in GRE_GetGREPathWithProperties

RESOLVED FIXED in mozilla2.0b9

Status

()

Core
XPCOM
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

({coverity, mlk})

Trunk
mozilla2.0b9
x86
Linux
coverity, mlk
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

678 bytes, patch
Benjamin Smedberg
: review+
Benjamin Smedberg
: approval2.0+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
159 GRE_GetGREPathWithProperties(const GREVersionRange *versions,

171   GREProperty *allProperties = new GREProperty[propertiesLength + 1];

189   if (env && *env) {
194 #if XP_UNIX
195     if (realpath(p, aBuffer))
196       return NS_OK;
197 #elif WINCE
209     return NS_OK;
210 #elif XP_WIN
211     if (_fullpath(aBuffer, p, aBufLen))
212       return NS_OK;
213 #elif XP_OS2
218       return NS_OK;
220 #elif XP_BEOS
227       return NS_OK;
232 #endif
234     if (strlen(p) >= aBufLen)
235       return NS_ERROR_FILE_NAME_TOO_LONG;
239     return NS_OK;


244   if (env && *env) {
246     return NS_OK;

249 #ifdef XP_MACOSX
296   if (aBuffer[0])
297     return NS_OK;

471   return NS_ERROR_FAILURE;
(Assignee)

Comment 1

7 years ago
Created attachment 496458 [details] [diff] [review]
proposal
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #496458 - Flags: review?(benjamin)
Attachment #496458 - Flags: approval2.0?

Comment 2

7 years ago
Comment on attachment 496458 [details] [diff] [review]
proposal

I really don't care because I hope nobody uses this API any more and it's scheduled for removal, but sure.
Attachment #496458 - Flags: review?(benjamin)
Attachment #496458 - Flags: review+
Attachment #496458 - Flags: approval2.0?
Attachment #496458 - Flags: approval2.0+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/125be03bd296
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.