2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

Fix computation of the token address when handling a partial read.

We want to treat it as an array of bytes, not an array of tokens.
Coverity CID 240011
This commit is contained in:
Todd C. Miller 2021-09-02 14:15:50 -06:00
parent f64d71674e
commit 157ceadfab

View File

@ -463,7 +463,7 @@ intercept_verify_token(int fd, struct intercept_closure *closure)
ssize_t nread;
debug_decl(intercept_read_token, SUDO_DEBUG_EXEC);
nread = recv(fd, &closure->token + closure->off,
nread = recv(fd, closure->token.u8 + closure->off,
sizeof(closure->token) - closure->off, 0);
switch (nread) {
case 0: