libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit a901003360f63da6861269ff1c682f46c7ed19c3
parent 1e7346ceb357c068d25896df431d50b85d7b7228
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun, 30 Jan 2022 17:40:19 +0300

test_digestauth*: fixed possible use of uninitialised data

Diffstat:
Msrc/testcurl/test_digestauth.c | 4++--
Msrc/testcurl/test_digestauth_sha256.c | 4++--
Msrc/testcurl/test_digestauth_with_arguments.c | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -423,8 +423,8 @@ testDigestAuth () while (off < 8) { len = read (fd, - rnd, - 8); + rnd + off, + 8 - off); if (len == (size_t) -1) externalErrorExitDesc ("Failed to read '/dev/urandom'"); off += len; diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c @@ -198,8 +198,8 @@ testDigestAuth () while (off < 8) { len = read (fd, - rnd, - 8); + rnd + off, + 8 - off); if (len == (size_t) -1) { fprintf (stderr, diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c @@ -181,7 +181,7 @@ testDigestAuth () } while (off < 8) { - len = read (fd, rnd, 8); + len = read (fd, rnd + off, 8 - off); if (len == (size_t) -1) { fprintf (stderr,