Skip to content

Conversation

@mwpnl
Copy link

@mwpnl mwpnl commented Aug 21, 2016

This pull request should resolve #37 by checking if a extension contains NULL data. When implemented, the extension is still given as output, but with an empty value (\0).

mwpnl added 2 commits August 21, 2016 15:28
…at would break processing the rest of the certificate.
BIO_free(ext_bio);
if (bptr->data == NULL){
BIO_free(ext_bio);
data="";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free(data) :)

@yorkie
Copy link
Collaborator

yorkie commented Aug 21, 2016

By the way, please follow the coding style at first.

@Southern
Copy link
Owner

@mwpnl Should @yorkie or I make the changes that were suggested so that this can be merged in? Been a little over 2 weeks with no response.

Copy link
Owner

@Southern Southern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the lack of activity in this PR, I'm starting to believe this was a case of a certificate being malformed or some other factor than this specific module and was solved by correcting that issue.

If we do decide to make this change, I would use the reverse logic and only allocate/copy/trim if bptr->data != NULL. I'm pretty sure that's what @yorkie was eluding to with https://github.com/Southern/node-x509/pull/39/files#r75600803.

data = trim(data, bptr->length);

BIO_free(ext_bio);
if (bptr->data == NULL){
Copy link
Owner

@Southern Southern Oct 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the better option would be to not run the allocation or anything that deals with data unless bptr->data != NULL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SegFault on certain certificates

3 participants