Author: pfg
Date: Tue Mar  8 14:38:06 2016
New Revision: 296498
URL: https://svnweb.freebsd.org/changeset/base/296498

Log:
  MFC r295675:
  Fix "naive" use of ftell(3).
  
  Secure coding practices, FIO19-C.

Modified:
  stable/10/usr.bin/mail/def.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/mail/def.h
==============================================================================
--- stable/10/usr.bin/mail/def.h        Tue Mar  8 11:04:08 2016        
(r296497)
+++ stable/10/usr.bin/mail/def.h        Tue Mar  8 14:38:06 2016        
(r296498)
@@ -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-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to