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)); \
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"