evp_decodefinal
API Overview
EVP_DecodeFinal is an API in openssl. This rule belongs to the return value check type. This rule is generated using AURC.
Rule Description
tip
EVP_DecodeFinal() returns -1 on error or 1 on success.
info
- Tags: return value check
- Parameter Index: N/A
- CWE Type: CWE-253
Rule Code
import cpp
class OpenSSLFunctionCall extends FunctionCall {
OpenSSLFunctionCall() {
this.getTarget().hasName("EVP_DecodeFinal")
}
}
from OpenSSLFunctionCall call, UnaryOperation uop
where
uop.getOperator() = "!" and
uop.getOperand() = call.getAnAccess()
select uop, "This negation checks the return value of EVP_DecodeFinal."