Closed Bug 620968 Opened 14 years ago Closed 14 years ago

GetUnixXDGUserDirectory can leave rv uninitialized ifdef MOZ_PLATFORM_MAEMO

Categories

(Core :: XPCOM, defect)

ARM
Maemo
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file)

474 GetUnixXDGUserDirectory(SystemDirectories aSystemDirectory,
475                         nsILocalFile** aFile)

477     char *dir = xdg_user_dir_lookup
481     nsresult rv;
482     nsCOMPtr<nsILocalFile> file;
let dir be false:
483     if (dir) {
let aSystemDirectory != Unix_XDG_Desktop
487     } else if (Unix_XDG_Desktop == aSystemDirectory) {
495     }
define MOZ_PLATFORM_MAEMO
496 #if defined(MOZ_PLATFORM_MAEMO)
let aSystemDirectory != Unix_XDG_Documents 
498     else if (Unix_XDG_Documents == aSystemDirectory) {
[skip this]
509         rv = file->AppendNative(NS_LITERAL_CSTRING(".documents"));
510     }
skip this:
511 #else
512     else {
513       // no fallback for the other XDG dirs
514       rv = NS_ERROR_FAILURE;
515     }
516 #endif

result: rv is uninitialized
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #499384 - Flags: review?(doug.turner)
Attachment #499384 - Flags: approval2.0?
Comment on attachment 499384 [details] [diff] [review]
patch

r+, basically NPODB.
Attachment #499384 - Flags: review?(doug.turner)
Attachment #499384 - Flags: review+
Attachment #499384 - Flags: approval2.0?
Attachment #499384 - Flags: approval2.0+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/c4c6b827e531
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: