opendnssec / SoftHSMv2

SoftHSM version 2
http://www.softhsm.org/
Other
780 stars 343 forks source link

Null dereference in C_UnwrapKey #673

Closed Eliot-Roxbergh closed 2 years ago

Eliot-Roxbergh commented 2 years ago

https://github.com/opendnssec/SoftHSMv2/blob/28c67fe771131fa31720258bd485089c108ec9bf/src/lib/SoftHSM.cpp#L7124-L7127

Due to an incorrect if statement, null dereference is possible on line 7126.

Compare with similar statements in the same file,

https://github.com/opendnssec/SoftHSMv2/blob/28c67fe771131fa31720258bd485089c108ec9bf/src/lib/SoftHSM.cpp#L7784-L7786

I am not able to do a PR, any help is welcome.

rijswijk commented 2 years ago

Good spot, this was indeed an error in an if statement, I merged a fix to the develop branch.