• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 00f47ed830fc22775ffdc2bc2a691372684fae4f Mon Sep 17 00:00:00 2001
2From: bradh352 <brad@brad-house.com>
3Date: Mon, 22 May 2023 07:02:59 -0400
4Subject: [PATCH] ares_rand static analysis fixes from CI
5
6Conflict: NA
7Reference: https://github.com/c-ares/c-ares/commit/00f47ed830fc22775ffdc2bc2a691372684fae4f
8---
9 src/lib/ares_rand.c | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
11
12diff --git a/src/lib/ares_rand.c b/src/lib/ares_rand.c
13index a564bc23..a55a90bf 100644
14--- a/src/lib/ares_rand.c
15+++ b/src/lib/ares_rand.c
16@@ -125,7 +125,7 @@ static void ares_rc4_init(ares_rand_rc4 *rc4_state)
17 }
18
19 /* Just outputs the key schedule, no need to XOR with any data since we have none */
20-static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf, int len)
21+static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf, size_t len)
22 {
23   unsigned char *S = rc4_state->S;
24   size_t         i = rc4_state->i;
25@@ -225,7 +225,6 @@ static void ares__rand_bytes(ares_rand_state *state, unsigned char *buf, size_t
26 {
27
28   while (1) {
29-    size_t rv;
30     size_t bytes_read = 0;
31
32     switch (state->type) {
33