Closed
Bug 552951
Opened 15 years ago
Closed 14 years ago
nsKeygenFormProcessor::GetPublicKey doesn't use pqgParams/arena created by decode_pqg_params
Categories
(Core Graveyard :: Security: UI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla5
People
(Reporter: timeless, Assigned: timeless)
References
Details
(Keywords: coverity, memory-leak, Whiteboard: [psm-easy])
Attachments
(2 files)
|
2.47 KB,
patch
|
KaiE
:
review+
beltzner
:
approval2.0-
|
Details | Diff | Splinter Review |
|
1.28 KB,
patch
|
mayhemer
:
review+
beltzner
:
approval2.0-
|
Details | Diff | Splinter Review |
505 nsKeygenFormProcessor::GetPublicKey(nsAString& aValue, nsAString&
516 PQGParams *pqgParams;
579 found_match:
580 pqgParams = decode_pqg_params(str);
Updated•15 years ago
|
Assignee: kaie → nobody
Whiteboard: [psm-easy]
kaie:
@@ -577,7 +576,7 @@ nsKeygenFormProcessor::GetPublicKey(nsAS
is the real change.
does this really make sense?
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #495386 -
Flags: review?(kaie)
Attachment #495386 -
Flags: approval2.0?
Comment 2•15 years ago
|
||
The interesting piece from your patch, you found that the value created in the following line is never used.
diff --git a/security/manager/ssl/src/nsKeygenHandler.cpp b/security/manager/ssl/src/nsKeygenHandler.cpp
--- a/security/manager/ssl/src/nsKeygenHandler.cpp
+++ b/security/manager/ssl/src/nsKeygenHandler.cpp
@@ -577,7 +576,7 @@ nsKeygenFormProcessor::GetPublicKey(nsAS
} while (end != nsnull);
goto loser;
found_match:
pqgParams = decode_pqg_params(str); <-------
According to CVS blame, this hasn't changed since initial CVS checkin.
In function nsKeygenFormProcessor::GetPublicKey, variable pqgParams was never used.
Comment 3•15 years ago
|
||
Comment on attachment 495386 [details] [diff] [review]
patch v1
I believe the call to decode_pqg_params was accidentally left in the code. I'm guessing the original code was doing things inline, and now this check is being done inside function pqg_prime_bits.
The call to decode_pqg_params doesn't have any effects besides creating the leaked return object.
I agree it's OK to remove this call and the variable.
I'm also OK with your other cleanup in this patch.
I'm not happy about introducing
(void)0;
I understand, though, it's necessary because of the goto label. Sigh.
Therefore, I give r=kaie for this patch, but would like to see a follow up patch that removes this ugliness and gets rid of the goto.
I'll attach that follow up patch.
Attachment #495386 -
Flags: review?(kaie) → review+
Updated•15 years ago
|
Attachment #495386 -
Attachment description: proposal → patch v1
Comment 4•15 years ago
|
||
Unrelated to the bug, patch on top of v1.
Replacing "goto found_match" and ugly statements with a bool.
Attachment #499367 -
Flags: review?(honzab.moz)
Comment 5•15 years ago
|
||
Comment on attachment 499367 [details] [diff] [review]
incremental patch v2
r=honzab
Attachment #499367 -
Flags: review?(honzab.moz) → review+
Comment 6•15 years ago
|
||
Comment on attachment 499367 [details] [diff] [review]
incremental patch v2
Note to drivers:
Please approve both patches.
Attachment #499367 -
Flags: approval2.0?
Comment 7•14 years ago
|
||
Comment on attachment 495386 [details] [diff] [review]
patch v1
At this point drivers need to know why you want this and what the risk is. Feel free to renominate with those.
Attachment #495386 -
Flags: approval2.0? → approval2.0-
Updated•14 years ago
|
Attachment #499367 -
Flags: approval2.0? → approval2.0-
Comment 8•14 years ago
|
||
The keywords say it all: We want it, because we want Firefox to be more correct and have less memory leaks.
What flag am I supposed to set, so we don't forget to land this later on?
Comment 9•14 years ago
|
||
Probably make it dep on bug 610267.
Comment 10•14 years ago
|
||
(In reply to comment #9)
> Probably make it dep on bug 610267.
Thanks a lot, that helps!
Depends on: post2.0
Comment 11•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
Comment 12•14 years ago
|
||
Comment 13•14 years ago
|
||
Can someone confirm if this is fixed?
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•