aboutsummaryrefslogtreecommitdiffstats
path: root/src/libradius/radius_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libradius/radius_socket.c')
-rw-r--r--src/libradius/radius_socket.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libradius/radius_socket.c b/src/libradius/radius_socket.c
index 3113ffff8..ba7cb14b0 100644
--- a/src/libradius/radius_socket.c
+++ b/src/libradius/radius_socket.c
@@ -260,8 +260,11 @@ static chunk_t decrypt_mppe_key(private_radius_socket_t *this, u_int16_t salt,
while (c < C.ptr + C.len)
{
/* b(i) = MD5(S + c(i-1)) */
- this->hasher->get_hash(this->hasher, this->secret, NULL);
- this->hasher->get_hash(this->hasher, seed, p);
+ if (!this->hasher->get_hash(this->hasher, this->secret, NULL) ||
+ !this->hasher->get_hash(this->hasher, seed, p))
+ {
+ return chunk_empty;
+ }
/* p(i) = b(i) xor c(1) */
memxor(p, c, HASH_SIZE_MD5);