New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More zalloc: fix default initialisation of some allocated objects #997
Conversation
@@ -135,6 +135,7 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) | |||
ndef_aux->ndef_bio = sarg.ndef_bio; | |||
ndef_aux->boundary = sarg.boundary; | |||
ndef_aux->out = out; | |||
ndef_aux->derbuf = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed because of the zalloc call.
d0ef38a
to
5107efa
Compare
6b9617c
to
3e2f7b4
Compare
To make sure I get it: the first commit is for 1.0.2/1.0.1 and the first and second are for master? |
Yes, that's it. |
3e2f7b4
to
67bf9cf
Compare
if (b == NULL) | ||
return 0; | ||
|
||
b->peer = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The null pointer isn't necessarily all 0 bits. See http://c-faq.com/null/runtime0.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, I may have missed this in early similar PRs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we only run on platforms where NULL is all-bits-zero. See test/nptest.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed test/nptest :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah!
Ok then
d3e5960
to
d075d2c
Compare
887d797
to
c3288b7
Compare
Ping @levitte |
c1c31db
to
244ce06
Compare
e323d67
to
d3e647a
Compare
@levitte is this good to go? |
Yes, looks good to me |
Sorry, @levitte - was that a plus one? |
Yes, sorry for the confusion. +1 |
done. |
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #997)
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #997)
Backport of 8e89e85 From PR openssl#1019 / openssl#997
1st commit is intended to be back-ported.
So, I revert some of his changes in the second commit directly.