OSDN Git Service

rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
authorMartin Storsjö <martin@martin.st>
Thu, 28 May 2015 08:39:45 +0000 (11:39 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 29 May 2015 06:42:38 +0000 (09:42 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpdh.c

index c29b563..b73d987 100644 (file)
@@ -137,11 +137,6 @@ static int dh_compute_key(FF_DH *dh, FFBigNum pub_key_bn,
                           uint32_t secret_key_len, uint8_t *secret_key)
 {
     FFBigNum k;
-    int num_bytes;
-
-    num_bytes = bn_num_bytes(dh->p);
-    if (num_bytes <= 0 || num_bytes > MAX_BYTES)
-        return -1;
 
     bn_new(k);
     if (!k)