From 2bc4f2cf6d32364e82eb9fee8698f13e8c3f258f Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 8 Mar 2016 14:38:06 +0000 Subject: MFC r295675: Fix "naive" use of ftell(3). Secure coding practices, FIO19-C. --- usr.bin/mail/def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/mail/def.h') 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)); \ } -- cgit v1.1