Ver código fonte

crypto: fixed safety check looking up var names

Daniel-Constantin Mierla 7 anos atrás
pai
commit
98f35707fb
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/modules/crypto/crypto_mod.c

+ 2 - 2
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;
 	}