summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-03-08 14:38:06 +0000
committerpfg <pfg@FreeBSD.org>2016-03-08 14:38:06 +0000
commit2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f (patch)
treea054dd122afd7c8f14c028bd06955024ff06a432 /usr.bin
parent1c6432f96ad3b5045f960019fabb112e22a5aaec (diff)
downloadFreeBSD-src-2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f.zip
FreeBSD-src-2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f.tar.gz
MFC r295675:
Fix "naive" use of ftell(3). Secure coding practices, FIO19-C.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mail/def.h2
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)); \
}
OpenPOWER on IntegriCloud