Module: kamailio
Branch: master
Commit: 98f35707fb00c8fa3512faff3b42a56a9e45e241
URL:
https://github.com/kamailio/kamailio/commit/98f35707fb00c8fa3512faff3b42a56…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-12-08T09:04:35+01:00
crypto: fixed safety check looking up var names
---
Modified: src/modules/crypto/crypto_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/98f35707fb00c8fa3512faff3b42a56…
Patch:
https://github.com/kamailio/kamailio/commit/98f35707fb00c8fa3512faff3b42a56…
---
diff --git a/src/modules/crypto/crypto_mod.c b/src/modules/crypto/crypto_mod.c
index 79345b7ae1..d3541ad03e 100644
--- a/src/modules/crypto/crypto_mod.c
+++ b/src/modules/crypto/crypto_mod.c
@@ -216,7 +216,7 @@ static int ki_crypto_aes_encrypt(sip_msg_t* msg, str *ins, str *keys,
str *dpv)
dst = pv_cache_get(dpv);
- if(dpv==NULL) {
+ if(dst==NULL) {
LM_ERR("failed getting pv: %.*s\n", dpv->len, dpv->s);
return -1;
}
@@ -330,7 +330,7 @@ static int ki_crypto_aes_decrypt(sip_msg_t* msg, str *ins, str *keys,
str *dpv)
dst = pv_cache_get(dpv);
- if(dpv==NULL) {
+ if(dst==NULL) {
LM_ERR("failed getting pv: %.*s\n", dpv->len, dpv->s);
return -1;
}