看板 DFBSD_commit 關於我們 聯絡資訊
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