diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-02-16 21:39:19 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-02-16 21:39:19 +0000 |
commit | 0bfdca975c225723475f281e0a114eafae08c5ae (patch) | |
tree | b0d6be11adc5946853f0ec6673cfc23fbc170274 /usr.bin/mail | |
parent | a721585d2730a274bdbc07bce39ae49894271ae1 (diff) | |
download | src-test-0bfdca975c225723475f281e0a114eafae08c5ae.tar.gz src-test-0bfdca975c225723475f281e0a114eafae08c5ae.zip |
Fix naive use of ftell(3).
Secure coding practices, FIO19-C.
Notes
Notes:
svn path=/head/; revision=295675
Diffstat (limited to 'usr.bin/mail')
-rw-r--r-- | usr.bin/mail/def.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h index e935c165caa38..e637252f6a8b6 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)); \ } |