Skip to content

Comments

speed: range check the argument given to -multi for 1.1.1#16922

Closed
paulidale wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
paulidale:fix-16899-1.1.1
Closed

speed: range check the argument given to -multi for 1.1.1#16922
paulidale wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
paulidale:fix-16899-1.1.1

Conversation

@paulidale
Copy link
Contributor

Fixes #16899 for 1.1.1 branch.

  • documentation is added or updated
  • tests are added or updated

@paulidale paulidale added approval: review pending This pull request needs review by a committer branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) labels Oct 26, 2021
@paulidale paulidale self-assigned this Oct 26, 2021
case OPT_MULTI:
#ifndef NO_FORK
multi = atoi(opt_arg());
if (multi >= INT_MAX / (int)sizeof(int)) {
Copy link
Member

Choose a reason for hiding this comment

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

perhaps a comment here explaining why you do the divide is a good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't such a comment in the equivalent code in master or 3.0 :)

@t8m t8m added the triaged: bug The issue/pr is/fixes a bug label Oct 27, 2021
openssl-machine pushed a commit that referenced this pull request Oct 28, 2021
Fixes #16899 for 1.1.1 branch.

Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16922)
@paulidale
Copy link
Contributor Author

Merged.