aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-04-04 21:54:22 +0000
committerGerald Combs <gerald@wireshark.org>2012-04-04 21:54:22 +0000
commit8b3024e57cfdec74a5eadfcea9c3e936fb2f1bef (patch)
treecb0deddd0e89e760109f821527ec69be1bb2c712 /epan/to_str.c
parentc67d24077ef60cbe997467f6294f8b856351cfd4 (diff)
Make bit_offset in _tvb_get_bits64 and related functions unsigned. This
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
Diffstat (limited to 'epan/to_str.c')
-rw-r--r--epan/to_str.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/to_str.c b/epan/to_str.c
index 93d3ad51aa..faab5d6956 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -892,7 +892,7 @@ rel_time_to_secs_str(const nstime_t *rel_time)
*/
char *
-decode_bits_in_field(const gint bit_offset, const gint no_of_bits, const guint64 value)
+decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint64 value)
{
guint64 mask = 0,tmp;
char *str;
@@ -1097,4 +1097,3 @@ gchar* guid_to_str_buf(const e_guid_t *guid, gchar *buf, int buf_len) {
*tempptr = '\0';
return buf;
}
-