Age | Commit message (Collapse) | Author | Files | Lines |
|
tvb_get_ephemeral_unicode_string(), throw an exception for invalid
lengths (including -1, but length==-1 does not work for other tvb string
functions either)
I believe this is the proper fix for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8112
svn path=/trunk/; revision=46705
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8097 :
Assert out if tvb_composite_finalize() is called on a composite TVB with
no members (sub-TVBs).
svn path=/trunk/; revision=46570
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8097 :
Put r46564 back in as the computation of member_length is non-trivial.
svn path=/trunk/; revision=46567
|
|
Rather than asserting out when we find a zero-length TVB in a composite TVB,
assert out when a dissector adds a zero-length TVB to a composite.
svn path=/trunk/; revision=46566
|
|
avoid an infinite recursion. More robust handling of the error case in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8097
but doesn't fix the actual bug (which is that either DHCP or BOOTP is building
an invalid tvbuff).
svn path=/trunk/; revision=46564
|
|
svn path=/trunk/; revision=45016
|
|
(COPYING will be updated in next commit)
svn path=/trunk/; revision=43536
|
|
svn path=/trunk/; revision=43266
|
|
- Allocate tmpbuf on stack. g_unichar_to_utf8[1] requires maximum 6B + 1 byte for NUL, align it to 8B.
- Use g_string_append_unichar()
[1] http://developer.gnome.org/glib/2.26/glib-Unicode-Manipulation.html#g-unichar-to-utf8
svn path=/trunk/; revision=43263
|
|
svn path=/trunk/; revision=42638
|
|
Put the code that's currently common to the ENC_ASCII and ENC_UTF_8
cases in tvb_get_ephemeral_string_enc() into tvb_get_ephemeral_string(),
and call tvb_get_ephemeral_string() in those cases. Skip the
tvb_ensure_bytes_exist() and ensure_contiguous() calls in the ENC_UTF_16
and ENC_UCS_2 cases, as they're unnecessary there.
Update the comment for tvb_get_ephemeral_string_enc().
Make tvb_get_ephemeral_stringz_enc() handle the encodings that
tvb_get_ephemeral_string_enc() does.
svn path=/trunk/; revision=42627
|
|
svn path=/trunk/; revision=42622
|
|
proto_tree_add_item() calls.
Add new "add_packet_field" method to the TreeItem class, taking a
protocol field (*not* a protocol), TvbRange, and encoding value as
arguments.
Add the ENC_ values to init.lua. Make them all hex #defines so
make-init-lua.pl can easily extract them.
Export tvb_unicode_strsize() for use by Lua (and elsewhere as desired).
Note that it handles UTF-16 and UTF-8, and fix the comment to note that
its count of hexadectets *does* include the null terminator (that's what
the code does).
svn path=/trunk/; revision=42621
|
|
same, and that the routines to get "Unicode" strings are really doing
UCS-2 (and not doing anything about code values that aren't valid in
UCS-2 strings).
Have tvb_get_ephemeral_string_enc() separate cases for ASCII and UTF-8,
even though they're *currently* treated the same.
For FT_UINT_STRING, treat an encoding value of TRUE as meaning
"little-endian ASCII"; pass all other encodings through to
tvb_get_ephemeral_string_enc().
svn path=/trunk/; revision=42592
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142
svn path=/trunk/; revision=42148
|
|
- Add const qualifier
- Remove some strange casts
svn path=/trunk/; revision=42131
|
|
negative or 0 when ep_alloc0(datalen) is called. If this happens, it's because of a dissector not checking the bit_offset, I think a DISSECTOR_ASSERT() is ok for fixing this. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7068
svn path=/trunk/; revision=42032
|
|
svn path=/trunk/; revision=41968
|
|
removes a potential buffer overflow and should fix a bunch of Coverity
errors mentioned in bug 6878.
We might want to do the same for no_of_bits.
svn path=/trunk/; revision=41945
|
|
svn path=/trunk/; revision=41870
|
|
Yay, first commit since r37883 (almost 9months).
svn path=/trunk/; revision=41869
|
|
too many bits."
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6878
From me: Correct the indentation to match the rest of the file.
svn path=/trunk/; revision=41230
|
|
svn path=/trunk/; revision=41228
|
|
epan/tvbuff.c: In function ‘tvb_get_bits16’:
epan/tvbuff.c:1736:82: error: unused parameter ‘encoding’ [-Werror=unused-parameter]
Compilation still fails with:
epan/tvbuff.c: In function ‘_tvb_get_bits64’:
epan/tvbuff.c:1829:19: error: ‘value’ may be used uninitialized in this function [-Werror=uninitialized
svn path=/trunk/; revision=41227
|
|
Overhaul of tvb_get_bitsxx() functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6878
svn path=/trunk/; revision=41226
|
|
svn path=/trunk/; revision=40473
|
|
svn path=/trunk/; revision=40278
|
|
- Essentially no changes from current dissector de facto tvbuff usage;
- Do away with 'usage_counts' and with 'used_in' GSLists;
- Manage tvb chains via a simple doubly linked list.
- API changes:
a. tvb_increment_usage_count() and tvb_decrement_usage_count() no
longer exist;
b. tvb_free_chain() can only be called for the 'top-level' (initial)
tvb of a chain) or for a tvb not in a chain.
c. tvb_free() now just calls tvb_free_chain() [should have no impact
on existing dissectors].
svn path=/trunk/; revision=40264
|
|
tvb_get_ephemeral_unicode_string().
svn path=/trunk/; revision=39528
|
|
appropriately; the only valid encoding is big-endian, so we don't
actually do anything different with the argument, so as not to break
code that passed it a gboolean endian flag.
svn path=/trunk/; revision=39237
|
|
svn path=/trunk/; revision=39161
|
|
svn path=/trunk/; revision=39155
|
|
When building the last byte, the remaining number of bits isn't masked.
svn path=/trunk/; revision=39152
|
|
svn path=/trunk/; revision=39150
|
|
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove
tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and
reassemble_cleanup() since they were only used for older GLib versions
which didn't support GSlices. Assume we always support the "matches"
operator.
svn path=/trunk/; revision=37978
|
|
make FT_STRING and FT_UINT_STRING handle string encodings.
Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC.
Add some URLs for DRDA.
Clean up some stuff in TN3270 and TN5250, including using ENC_ values
for proto_tree_add_item().
svn path=/trunk/; revision=37909
|
|
tvb_get_ephemeral_string() but takes an ENC_ value for the character
encoding. Use it in the MQ dissector to fetch strings to put, for
example, into the Info column, so we properly handle EBCDIC strings
there.
svn path=/trunk/; revision=37876
|
|
svn path=/trunk/; revision=37685
|
|
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.
svn path=/trunk/; revision=37422
|
|
svn path=/trunk/; revision=37264
|
|
- Add lsb0 (read: least significant bit is 0) parameter to tvb_get_bits_buf()
(not tested, might be buggy...)
svn path=/trunk/; revision=37254
|
|
svn path=/trunk/; revision=37217
|
|
compr is also freed outside loop. So free it only when returning.
Might be related with bug #5908, but I don't have access to that bug ;-)
svn path=/trunk/; revision=37081
|
|
I've fixed composite tests #0 and #2
svn path=/trunk/; revision=36440
|
|
svn path=/trunk/; revision=35713
|
|
svn path=/trunk/; revision=35689
|
|
("Value stored to 'xxx' during its initialization is never read")
svn path=/trunk/; revision=35598
|
|
svn path=/trunk/; revision=35538
|
|
directly.
svn path=/trunk/; revision=35509
|
|
pointer to a NULL-terminated string in the TVB. It is no safer than dissectors
which call tvb_get_strsize() and then tvb_get_ptr() but it makes it clear that
this usage of tvb_get_ptr() is safe.
This function is slightly more efficient than tvb_get_ephemeral_stringz()--but
only as long as we're not using composite TVBs.
svn path=/trunk/; revision=35493
|