Closed Bug 251247 Opened 21 years ago Closed 21 years ago

Uninitialized mChangedList in nsPermissionManager

Categories

(Core :: Networking: Cookies, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: pkwarren, Assigned: mvl)

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file)

When running Mozilla Mail/News under Valgrind, I get the following warning in nsPermissionManager: Conditional jump or move depends on uninitialised value(s) at 0x1D6297D3: nsPermissionManager::Write() (nsPermissionManager.cpp:831) by 0x1D628725: nsPermissionManager::Observe(nsISupports*, char const*, unsigned short const*) (nsPermissionManager.cpp:483) by 0x1BDFF1A3: nsObserverService::NotifyObservers(nsISupports*, char const*, unsigned short const*) (nsObserverService.cpp:208) by 0x1D10D311: nsProfile::ShutDownCurrentProfile(unsigned) (nsProfile.cpp:1364) by 0x8061F86: DoOnShutdown() (nsAppRunner.cpp:807) by 0x8064E1E: main (nsAppRunner.cpp:1802) I am not familiar with this code, but it looks like mChangedList is just a boolean which marks whether or not the permission file should be written (based on if there are changes in memory which have not yet been flushed to disk). I think it is safe to initialize it to PR_FALSE in this case.
Attached patch init itSplinter Review
Yeah, that should be set to false.
Assignee: darin → mvl
Status: NEW → ASSIGNED
Attachment #153070 - Flags: superreview?(darin)
Attachment #153070 - Flags: review?(dwitte)
Comment on attachment 153070 [details] [diff] [review] init it how serious is this? should we concern ourselves with the 1.7 branch or ffox 1.0 ?
Attachment #153070 - Flags: superreview?(darin) → superreview+
It isn't serious. From what i see, all that can happen is that hostperm.1 is written out when it isn't necessary. If there are changes to the permlist, mChangedList will be set, so there is no dataloss.
Attachment #153070 - Flags: review?(dwitte) → review+
checked in
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Keywords: fixed-aviary1.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: