Skip to content
Snippets Groups Projects
Commit b4bf886c authored by Tristan Matthews's avatar Tristan Matthews Committed by Alexandre Lision
Browse files

tls: fix (improbable) out of bounds read

Although read(fd, out-of-bounds-address, 0) should not
actually result in a crash, this keeps static analysis
tools happy.

Refs #51340

Change-Id: Ie22ed8837f37dd1ba2b55749458815f91dfdc34a
parent 9800f8df
Branches
Tags
No related merge requests found
......@@ -102,7 +102,7 @@ static unsigned char *crypto_file_read(const char *path, size_t *out_len)
goto out;
}
*out_len += bytes_read;
} while ((bytes_read > 0) && (*out_len <= file_size));
} while ((bytes_read > 0) && (*out_len < file_size));
out:
close(fd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment