test_digestauth*: fixed possible use of uninitialised data

This commit is contained in:
Evgeny Grin (Karlson2k)
2022-01-30 17:40:19 +03:00
parent 1e7346ceb3
commit a901003360
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -198,8 +198,8 @@ testDigestAuth ()
while (off < 8)
{
len = read (fd,
rnd,
8);
rnd + off,
8 - off);
if (len == (size_t) -1)
{
fprintf (stderr,
@@ -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,