diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-04-28 02:56:42 -0500 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-03-27 19:08:26 +0200 |
commit | e6765bd363d2dd1dcaeeae5117cc25aae53fb944 (patch) | |
tree | 2cb906292e122518d7edc20273a568f5f30a501a | |
parent | f06b82a6ad1368fe1b2bb67c8b93e79f846dbdd4 (diff) | |
download | posixtz-e6765bd363d2dd1dcaeeae5117cc25aae53fb944.tar.bz2 posixtz-e6765bd363d2dd1dcaeeae5117cc25aae53fb944.tar.xz |
posixtz: ensure the file offset we pass to lseek is off_t
on 32-bit systems, sizeof(off_t) is 4, on 64-bit sizeof(off_t) is 8
causing a word masking issue.
-rw-r--r-- | posixtz.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -36,7 +36,7 @@ char *posix_tz(const char *filename) if (r != TZ_BUFLEN || strncmp(buf, "TZif", 4) != 0 || (unsigned char)buf[4] < 2 - || lseek(fd, -TZ_BUFLEN, SEEK_END) < 0 + || lseek(fd, (off_t) -TZ_BUFLEN, SEEK_END) < 0 ) goto ERROR; |