Closed Bug 1132818 Opened 5 years ago Closed 5 years ago

Fix -Wsometimes-uninitialized nsresult warning in security/nss/lib/smime/smimeutil.c

Categories

(NSS :: Libraries, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

key_type is uninitialized if CERT_ExtractPublicKey() returns null:

security/nss/lib/smime/smimeutil.c:440:10: warning: variable 'key_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
Attachment #8563945 - Flags: review?(mmc)
Comment on attachment 8563945 [details] [diff] [review]
Wsometimes-uninitialized_key_type.patch

Review of attachment 8563945 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, Chris!
Attachment #8563945 - Flags: review?(mmc) → review+
Component: Security: PSM → Libraries
Product: Core → NSS
Version: unspecified → trunk
Monica, how do I land a patch in the NSS tree?
Flags: needinfo?(mmc)
First, my bad for not noticing that this fix was in NSS and not PSM. Second, I'm not actually a PSM peer anyway! I think David can do this for you.
Flags: needinfo?(mmc) → needinfo?(dkeeler)
I think technically we need a non-Mozilla person to review this. In any case, I don't actually have commit access to NSS. Perhaps Kai can take care of this.
Flags: needinfo?(dkeeler) → needinfo?(kaie)
(In reply to [:mmc] Monica Chew (please use needinfo) from comment #3)
> First, my bad for not noticing that this fix was in NSS and not PSM. Second,
> I'm not actually a PSM peer anyway! I think David can do this for you.

I filed this bug in the Core::Security::PSM component because I didn't realize Bugzilla had a dedicated NSS product. (Thanks, Cykesiopka! :)
No problem!
Comment on attachment 8563945 [details] [diff] [review]
Wsometimes-uninitialized_key_type.patch

r=kaie
Flags: needinfo?(kaie)
Attachment #8563945 - Flags: review+
https://hg.mozilla.org/projects/nss/rev/10c82beac914
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.18
Duplicate of this bug: 943907
Duplicate of this bug: 852927
You need to log in before you can comment on or make changes to this bug.