git: hexdump: always stat input when skipping

看板DFBSD_commit作者時間16年前 (2009/08/11 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit a030f2fad7ca7b90cf61d2be5ba16149a2c13f9c Author: Sascha Wildner <saw@online.de> Date: Mon Aug 10 10:30:20 2009 +0200 hexdump: always stat input when skipping The previous code would not fstat(2) the input, if operating on stdin. Still, it would use the uninitialized struct stat to decide whether to seek in the input or not. This could either lead to hexdump reading the skipped input, instead of directly seeking, or, worse, trying a seek even though this not being possible. Fix this issue by always fstat()ing the input. Submitted-by: corecode Summary of changes: usr.bin/hexdump/display.c | 24 +++++++++--------------- usr.bin/hexdump/hexdump.h | 2 +- 2 files changed, 10 insertions(+), 16 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a030f2fad7ca7b90cf61d2be5ba16149a2c13f9c -- DragonFly BSD source repository
文章代碼(AID): #1AW61nfv (DFBSD_commit)