Fix swapped args of lseek() when rewinding. This didn't cause a

problem because the value of SEEK_SET is 0.
This commit is contained in:
Todd C. Miller
2018-05-11 07:45:22 -06:00
parent 6e290763ca
commit 7b1e78d6df

View File

@@ -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;