diff options
author | pfg <pfg@FreeBSD.org> | 2016-03-08 14:38:06 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-03-08 14:38:06 +0000 |
commit | 2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f (patch) | |
tree | a054dd122afd7c8f14c028bd06955024ff06a432 | |
parent | 1c6432f96ad3b5045f960019fabb112e22a5aaec (diff) | |
download | FreeBSD-src-2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f.zip FreeBSD-src-2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f.tar.gz |
MFC r295675:
Fix "naive" use of ftell(3).
Secure coding practices, FIO19-C.
-rw-r--r-- | usr.bin/mail/def.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h index e935c16..e637252 100644 --- a/usr.bin/mail/def.h +++ b/usr.bin/mail/def.h @@ -270,5 +270,5 @@ struct ignoretab { */ #define trunc(stream) { \ (void)fflush(stream); \ - (void)ftruncate(fileno(stream), (off_t)ftell(stream)); \ + (void)ftruncate(fileno(stream), ftello(stream)); \ } |