[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: test_digestauth*: fixed possible use of uninitial
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: test_digestauth*: fixed possible use of uninitialised data |
Date: |
Sun, 30 Jan 2022 16:35:55 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit a901003360f63da6861269ff1c682f46c7ed19c3
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Jan 30 17:40:19 2022 +0300
test_digestauth*: fixed possible use of uninitialised data
---
src/testcurl/test_digestauth.c | 4 ++--
src/testcurl/test_digestauth_sha256.c | 4 ++--
src/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
index 47d4f5d0..a2b38b2e 100644
--- 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
index f6df664e..bb0e786c 100644
--- 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
index ac1aed56..602c1180 100644
--- 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,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.