Closed Bug 231137 Opened 21 years ago Closed 21 years ago

NS_GetSpecialDirectory rv isn't checked in WriteProperties

Categories

(Core Graveyard :: RDF, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: ted)

References

()

Details

Attachments

(1 file)

228 NS_GetSpecialDirectory(NS_APP_CHROME_DIR, getter_AddRefs(chromeFile)); 229 230 chromeFile->AppendNative(NS_LITERAL_CSTRING("chrome.rdf")); NS_GetSpecialDirectory can fail, when it fails then chromeFile will be null, and 230 will crash.
Comment on attachment 139206 [details] [diff] [review] Checks return value of NS_GetSpecialDirectory personally i'd probably reorder the NS_Get... to before the fopen to save on the fclose, that seems safe.
Attachment #139206 - Flags: review?(bsmedberg)
Attachment #139206 - Flags: review?(bsmedberg) → review+
Attachment #139206 - Flags: superreview?(tor)
Attachment #139206 - Flags: superreview?(tor) → superreview+
Assignee: bsmedberg → luser_bugzilla
mozilla/rdf/chrome/tools/chromereg/regchrome.cpp 1.10
Status: NEW → 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: