buildbot bugfix: another (un-)signed problem and a problem with the offset (fixed by calling tvb_ensure...)

svn path=/trunk/; revision=13921
This commit is contained in:
Ulf Lamping 2005-03-26 12:10:58 +00:00
parent 2b8ac21d60
commit 9fe9c6826f

View file

@ -3528,7 +3528,7 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_tree *value_tree;
guint8 code, id, value_size;
guint16 length;
gint32 length;
int offset;
code = tvb_get_guint8(tvb, 0);
@ -3594,6 +3594,7 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
offset+=value_size;
length-=value_size;
if (length > 0) {
tvb_ensure_bytes_exist(tvb, offset, length);
proto_tree_add_text(field_tree, tvb, offset, length,
"Name (%u byte%s)", length,
plurality(length, "", "s"));