From 7b1e78d6dfb537326a2c0e2340a46dec23330b1a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 11 May 2018 07:45:22 -0600 Subject: [PATCH] Fix swapped args of lseek() when rewinding. This didn't cause a problem because the value of SEEK_SET is 0. --- plugins/sudoers/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index 54e7280f4..5b853f725 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -782,7 +782,7 @@ digest_matches(int fd, const char *file, const struct sudo_digest *sd) debug_decl(digest_matches, SUDOERS_DEBUG_MATCH) file_digest = sudo_filedigest(fd, file, sd->digest_type, &digest_len); - lseek(fd, SEEK_SET, (off_t)0); + (void) lseek(fd, (off_t)0, SEEK_SET); if (file_digest == NULL) { /* Warning (if any) printed by sudo_filedigest() */ goto done; -- 2.50.1