diff options
author | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-10 14:37:09 +0000 |
---|---|---|
committer | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-10 14:37:09 +0000 |
commit | cbe412bb9b96ba45eba145fc4ceea1e5b7c328e0 (patch) | |
tree | 7e098c7dd65230b608b0f2714a129a6a1016334e /epan/ftypes | |
parent | be106029f6afa1f75802d29486acc8626ad5d41f (diff) |
Use the correct type, that is GByteArray instead of GString. The reason why this 'worked' before (on non-64bit platforms that is):
struct _GString
{
gchar *str;
gsize len;
gsize allocated_len;
};
And:
struct _GArray
{
gchar *data;
guint len;
};
We only accessed the first two fields of the GString struct.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29841 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/ftypes')
-rw-r--r-- | epan/ftypes/ftype-bytes.c | 6 | ||||
-rw-r--r-- | epan/ftypes/ftypes.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c index c5cf88d4be..ad24168db3 100644 --- a/epan/ftypes/ftype-bytes.c +++ b/epan/ftypes/ftype-bytes.c @@ -93,7 +93,7 @@ bytes_repr_len(fvalue_t *fv, ftrepr_t rtype _U_) * 3 bytes it can be at most "2097151." (8 bytes we give it 12) * 4 bytes it can be at most "268435456." (10 bytes we give it 16) * 5 bytes it can be at most "34359738368." (12 bytes we give it 20) - * + * * a 5 bytes encoded subid can already overflow the guint32 that holds a sub-id, * making it a completely different issue! */ @@ -476,7 +476,7 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b) static gboolean cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b) { - GString *a = fv_a->value.gstring; + GByteArray *a = fv_a->value.bytes; pcre_tuple_t *pcre_t = fv_b->value.re; int options = 0; int rc; @@ -494,7 +494,7 @@ cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b) rc = pcre_exec( pcre_t->re, /* Compiled PCRE */ pcre_t->ex, /* PCRE extra from pcre_study() */ - a->str, /* The data to check for the pattern... */ + a->data, /* The data to check for the pattern... */ (int)a->len, /* ... and its length */ 0, /* Start offset within data */ options, /* PCRE options */ diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h index 99f4149b96..2b4c839400 100644 --- a/epan/ftypes/ftypes.h +++ b/epan/ftypes/ftypes.h @@ -156,7 +156,6 @@ typedef struct _fvalue_t { gchar *string; guchar *ustring; GByteArray *bytes; - GString *gstring; ipv4_addr ipv4; e_guid_t guid; nstime_t time; |