]> granicus.if.org Git - curl/commitdiff
randit: store the value in the buffer
authorKamil Dudka <kdudka@redhat.com>
Wed, 21 Dec 2016 14:09:31 +0000 (15:09 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Dec 2016 22:42:43 +0000 (23:42 +0100)
lib/rand.c

index 0e716a77c3a721ede40d603f681a52c93d6252fc..a51951ceafbdb28c84389a14d0bc1afafb9594f4 100644 (file)
@@ -59,7 +59,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd)
 #endif
 
   /* data may be NULL! */
-  result = Curl_ssl_random(data, (unsigned char *)&rnd, sizeof(rnd));
+  result = Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd));
   if(result != CURLE_NOT_BUILT_IN)
     /* only if there is no random funtion in the TLS backend do the non crypto
        version, otherwise return result */