diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-07-10 21:05:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-07-10 21:05:19 +0000 |
commit | 41d53a1635e2253a91f6bbe4eb6b705b1b368e55 (patch) | |
tree | 2d0b97af913df373d52af57cffcc4be3de26651c /wiretap/lanalyzer.c | |
parent | a3ae7446363632344342aa91e27b7999b511b372 (diff) |
At that point in the code, bytes_read isn't the total number of record
header bytes read, as we're reading the two header fields separately and
checking the byte count for each read. We *do*, however, know that the
record header is 4 bytes long, so we can just seek back 4 bytes.
svn path=/trunk/; revision=37953
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r-- | wiretap/lanalyzer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c index f08e2a5767..5816778459 100644 --- a/wiretap/lanalyzer.c +++ b/wiretap/lanalyzer.c @@ -276,13 +276,13 @@ int lanalyzer_open(wtap *wth, int *err, gchar **err_info) /* Trace Packet Data Record */ case RT_PacketData: - /* Go back header number ob ytes so that lanalyzer_read + /* Go back header number of bytes so that lanalyzer_read * can read this header */ - if (file_seek(wth->fh, -bytes_read, SEEK_CUR, err) == -1) { + if (file_seek(wth->fh, -4, SEEK_CUR, err) == -1) { g_free(wth->priv); return -1; } - wth->data_offset -= bytes_read; + wth->data_offset -= 4; return 1; default: |