Skip to content
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

fixed type conversion #2982

Closed
wants to merge 1 commit into from
Closed

Conversation

frankmorgner
Copy link
Member

fixes #2967

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

@@ -526,7 +526,7 @@ static CK_RV gostr3410_verify_data(const CK_BYTE_PTR pubkey, CK_ULONG pubkey_len
if (!(buf = malloc(buf_len)))
r = -1;
if (r == 1 && P)
r = EC_POINT_point2oct(group, P, POINT_CONVERSION_COMPRESSED, buf, buf_len, NULL);
buf_len = EC_POINT_point2oct(group, P, POINT_CONVERSION_COMPRESSED, buf, buf_len, NULL);
Copy link
Member

Choose a reason for hiding this comment

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

this assumes this call EC_POINT_point2oct() can not fail. I think the return value 0 should be checked before continuing to the next operation (but this was an issue with the old code too and it is actually an issue with the previous call too, which would result in malloc(0)).

In any case as I mentioned in #2982 I am afraid there will be much more issues like this.

@frankmorgner
Copy link
Member Author

closing this in favor of #2993

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.

MacOS build failure with OpenSSL 3.0
2 participants