svn commit: r295675 - head/usr.bin/mail
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Feb 16 21:39:21 UTC 2016
Author: pfg
Date: Tue Feb 16 21:39:19 2016
New Revision: 295675
URL: https://svnweb.freebsd.org/changeset/base/295675
Log:
Fix naive use of ftell(3).
Secure coding practices, FIO19-C.
Modified:
head/usr.bin/mail/def.h
Modified: head/usr.bin/mail/def.h
==============================================================================
--- head/usr.bin/mail/def.h Tue Feb 16 21:36:48 2016 (r295674)
+++ head/usr.bin/mail/def.h Tue Feb 16 21:39:19 2016 (r295675)
@@ -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)); \
}
More information about the svn-src-head
mailing list