diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-09-28 21:35:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-09-29 04:35:48 +0000 |
commit | e91af83c637adaa7a9837de65f50596a32b08db0 (patch) | |
tree | 0c18941d92ae6ec9274f9035dfc26ed369e11572 /wiretap/snoop.c | |
parent | 48b641576c53e9c7cef2e9487669460a975a0c0d (diff) | |
download | wireshark-e91af83c637adaa7a9837de65f50596a32b08db0.tar.gz |
Replace some seeks forward with wtap_read_bytes() with a null buffer pointer.
If the seek forward is just skipping record content that's not
(currently) interesting, use wtap_read_bytes() with a null buffer
pointer; it catches short "reads" and requires less seeking, so it may
work better when reading from a pipe.
Change-Id: Ifb07d20e0391a8ed97da85149d971b4e9ef093a8
Reviewed-on: https://code.wireshark.org/review/17976
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/snoop.c')
-rw-r--r-- | wiretap/snoop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 6939c6c752..1831e422c6 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -735,7 +735,7 @@ snoop_read_shomiti_wireless_pseudoheader(FILE_T fh, } /* Skip the header. */ rsize = ((int) whdr.pad[3]) - 8; - if (file_seek(fh, rsize, SEEK_CUR, err) == -1) + if (!wtap_read_bytes(fh, NULL, rsize, err, err_info)) return FALSE; memset(&pseudo_header->ieee_802_11, 0, sizeof(pseudo_header->ieee_802_11)); |