wireshark/wireshark-0023-Copy-over-r54544-from-trunk.patch
Peter Lemenkov ab5f7ca144 A couple of bugfixes and enhancements
- Updated RTPproxy dissector (again)
- Fix rare issue with the Sniffer traces (patch no. 23)

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2014-01-13 16:38:45 +04:00

35 lines
1.3 KiB
Diff

From: Guy Harris <guy@alum.mit.edu>
Date: Wed, 1 Jan 2014 23:24:27 +0000
Subject: [PATCH] Copy over r54544 from trunk:
------------------------------------------------------------------------
r54544 | guy | 2014-01-01 15:22:53 -0800 (Wed, 01 Jan 2014) | 11 lines
If the uncompression buffers are empty, they have no data; set the count
of bytes in them to 0, as there's no data in them, and set the offset in
that buffer of the stream's current position, to 0, as we're currently
at the beginning of the file in both streams.
This fixes some tricky-to-reproduce errors (which show up only if the
ngsniffer_t structure is allocated from data that's been allocated,
written to in those variables, and freed).
svn path=/trunk-1.10/; revision=54545
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 92e451d..096ee00 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -740,7 +740,11 @@ ngsniffer_open(wtap *wth, int *err, gchar **err_info)
/* We haven't allocated any uncompression buffers yet. */
ngsniffer->seq.buf = NULL;
+ ngsniffer->seq.nbytes = 0;
+ ngsniffer->seq.nextout = 0;
ngsniffer->rand.buf = NULL;
+ ngsniffer->rand.nbytes = 0;
+ ngsniffer->rand.nextout = 0;
/* Set the current file offset; the offset in the compressed file
and in the uncompressed data stream currently the same. */