Closed Bug 231135 Opened 22 years ago Closed 21 years ago

NS_NewLocalFile rv isn't checked in nsProfile::CreateNewProfileWithLocales

Categories

(Core Graveyard :: Profile: BackEnd, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: ted)

References

()

Details

Attachments

(1 file, 1 obsolete file)

1622 rv = NS_NewLocalFile(nsDependentString(nativeProfileDir), PR_TRUE, (nsILocalFile **)((nsIFile **)getter_AddRefs(profileDir))); 1623 1624 // this prevents people from choosing there profile directory 1625 // or another directory, and remove it when they delete the profile. 1626 // append profile name 1627 profileDir->Append(nsDependentString(profileName)); NS_NewLocalFile can fail (hence rv), when it fails then profileDir will be null, and 1627 will crash.
Attached patch Check rv for failure (obsolete) — Splinter Review
per timeless' request
Attachment #139205 - Flags: superreview?(dbaron)
Attachment #139205 - Flags: review?(dbaron)
Comment on attachment 139205 [details] [diff] [review] Check rv for failure sr=dbaron, but please find an owner/peer to review
Attachment #139205 - Flags: superreview?(dbaron)
Attachment #139205 - Flags: superreview+
Attachment #139205 - Flags: review?(dbaron)
Attachment #139205 - Flags: review?
Attachment #139205 - Flags: review? → review?(sspitzer)
// this prevents people from choosing there profile directory "their"?
Attachment #139205 - Flags: review?(sspitzer) → review?(dveditz)
Comment on attachment 139205 [details] [diff] [review] Check rv for failure r=dveditz (and fix s/there/their/ in the following comment as ben mentioned)
Attachment #139205 - Flags: review?(dveditz) → review+
Fixed spelling error
Assignee: nobody → luser_bugzilla
Attachment #139205 - Attachment is obsolete: true
Status: NEW → ASSIGNED
mozilla/profile/src/nsProfile.cpp 1.305
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: