Closed
Bug 631423
Opened 13 years ago
Closed 13 years ago
crash [@ mozilla::places::GenerateRandomBytes]
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla2.0b12
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: mak, Assigned: sdwilsh)
Details
(Keywords: crash, Whiteboard: [softblocker])
Crash Data
Attachments
(1 file)
785 bytes,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
I've found only 1 report for this in the last 2 weeks, but I think it could make sense 275 BOOL rc = CryptAcquireContext(&cryptoProvider, 0, 0, PROV_RSA_FULL, 276 CRYPT_VERIFYCONTEXT | CRYPT_SILENT); 277 if (rc) { 278 rc = CryptGenRandom(cryptoProvider, aSize, _buffer); 279 } 280 (void)CryptReleaseContext(cryptoProvider, 0); if CryptAcquireContext fails there is no valid assumption on cryptoProvider, we should not try to call CryptReleaseContext or at least null check cryptoProvider.
Assignee | ||
Comment 1•13 years ago
|
||
(In reply to comment #0) > if CryptAcquireContext fails there is no valid assumption on cryptoProvider, we > should not try to call CryptReleaseContext or at least null check > cryptoProvider. Except that CryptReleaseContext can handle NULL (it'd just return ERROR_INVALID_HANDLE). We could certain move it, but it's not going to change anything here.
Assignee | ||
Comment 2•13 years ago
|
||
Although we don't initialize the value, so we could crash there. Yes, we should fix this (by either initializing the value, or moving it inside the if.
blocking2.0: --- → final+
Whiteboard: [softblocker]
Reporter | ||
Comment 3•13 years ago
|
||
well, I don't know what CryptAcquireContext does when it fails, so it's even possible that we try to Release a half baked context regardless what we init. I'd prefer moving it inside the if.
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•13 years ago
|
||
Assignee: mak77 → sdwilsh
Attachment #509795 -
Flags: review?(mak77)
Reporter | ||
Updated•13 years ago
|
Attachment #509795 -
Flags: review?(mak77) → review+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [softblocker] → [softblocker][can land]
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/fa598dd31ac6
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [softblocker][can land] → [softblocker]
Target Milestone: --- → mozilla2.0b12
Updated•13 years ago
|
Crash Signature: [@ mozilla::places::GenerateRandomBytes]
You need to log in
before you can comment on or make changes to this bug.
Description
•