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

TKSS-420: SM4Parameters::engineGetParameterSpec throws NullPointerException #421

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

johnshajiang
Copy link
Collaborator

If SM4Parameters instance is initiated via method engineInit(AlgorithmParameterSpec paramSpec), and then engineGetParameterSpec will throws NullPointerException.

In the above case, the encoded is null, so the invocation on method decode must fail with NullPointerException.
However, it is unnecessary to try to decode the iv, since the iv is already there.

This PR will resolves #420.

@johnshajiang johnshajiang added the bug Something isn't working label Sep 28, 2023
@johnshajiang johnshajiang self-assigned this Sep 28, 2023
@johnshajiang johnshajiang merged commit 06dd8dd into Tencent:master Sep 28, 2023
7 checks passed
@johnshajiang johnshajiang deleted the TKSS-420 branch September 28, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SM4Parameters::engineGetParameterSpec throws NullPointerException
1 participant