Skip to content

Conversation

tmeisenh
Copy link
Contributor

@tmeisenh tmeisenh commented Jan 19, 2017

Addresses coverity scan issue 55489

The existing tests pass but I did not add any new tests. I did not see any existing tests around error handling of openssl functions nor any test harness to allow you to do so.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. lts-watch-v6.x labels Jan 19, 2017
@tmeisenh
Copy link
Contributor Author

Updated commit (force push on my branch) just updates original commit message to reference the issue number.

@mscdex
Copy link
Contributor

mscdex commented Jan 19, 2017

@tmeisenh
Copy link
Contributor Author

I must be missing something b/c when I review the output of test/arm I don't see a failure...

@gibfahn
Copy link
Member

gibfahn commented Jan 19, 2017

@tmeisenh It's an issue with the github bot that sends the results back, if it's green on ci.nodejs.org (which it is), then CI passed.

CI is green

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM but the commit log's status line should be <= 50 characters.

@tmeisenh
Copy link
Contributor Author

@gibfahn Awesome, thanks for the explanation.
@bnoordhuis nice catch on the commit log exceeding the recommended length. I can alter that if necessary.

@Trott
Copy link
Member

Trott commented Jan 20, 2017

nice catch on the commit log exceeding the recommended length. I can alter that if necessary.

If you wouldn't mind amending the commit message, you'll save whoever lands this a few keystrokes. But if you don't update it, whoever lands it can update it for you, so either way, really.

Fixes coverity scan issue 55489.
@tmeisenh
Copy link
Contributor Author

Updated commit message

HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
return true;
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
return r == 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it can only occur with engines: openssl/openssl@87d52468aa600e023, so untestable.

Copy link
Contributor

@sam-github sam-github left a comment

Choose a reason for hiding this comment

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

OK, debugged, it does look the digests return 1 on success, and always do this for software digests, so LGTM

@Trott
Copy link
Member

Trott commented Jan 20, 2017

Running CI again only because the pushing of the amended commit message theoretically may have accidentally included a code change or something. Just being thorough.

CI: https://ci.nodejs.org/job/node-test-pull-request/5968/

@sam-github
Copy link
Contributor

Landed in 5ea98fb, thanks.

@sam-github sam-github closed this Jan 24, 2017
sam-github pushed a commit that referenced this pull request Jan 24, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
targos pushed a commit that referenced this pull request Jan 28, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
Fixes coverity scan issue 55489.

PR-URL: nodejs#10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
Fixes coverity scan issue 55489.

PR-URL: nodejs#10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
jasnell pushed a commit that referenced this pull request Mar 8, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
jasnell pushed a commit that referenced this pull request Mar 8, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Fixes coverity scan issue 55489.

PR-URL: #10891
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Brian White <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants