mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
Cast sizeof(entry) to off_t before making it a negative offset for
lseek(). Fixes "sudo -k" on Solaris and probably others.
This commit is contained in:
@@ -873,7 +873,7 @@ timestamp_remove(bool unlink_it)
|
||||
/* Back up and disable the entry. */
|
||||
if (!ISSET(entry.flags, TS_DISABLED)) {
|
||||
SET(entry.flags, TS_DISABLED);
|
||||
lseek(fd, 0 - sizeof(entry), SEEK_CUR);
|
||||
lseek(fd, 0 - (off_t)sizeof(entry), SEEK_CUR);
|
||||
if (ts_write(fd, fname, &entry, -1) == -1)
|
||||
rval = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user