aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-06-25 14:58:06 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-06-25 14:58:06 +0000
commit7491b68a3a5544c6ed9f67d7e59af5e7559dec32 (patch)
tree53e05e21b3947d7f4f68e56e0a3b5dde82066698 /epan
parenteaa3542ae74d35636d7b1ad07c76e43074b87990 (diff)
Make guy's fix in revision 37236 actually work:
"You cannot just make the "len" field of a GByteArray larger, if there's no data to back that length; you can only make it smaller." Two equal values are always equal! This fixes bug 5941. svn path=/trunk/; revision=37783
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index a26f9242a4..1ecee43159 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -4112,7 +4112,7 @@ proto_item_set_len(proto_item *pi, const gint length)
* larger, if there's no data to back that length;
* you can only make it smaller.
*/
- if (fi->value.ftype->ftype == FT_BYTES && length <= fi->length)
+ if (fi->value.ftype->ftype == FT_BYTES && length <= (gint)fi->value.value.bytes->len)
fi->value.value.bytes->len = length;
}