diff options
author | Olivier Biot <obiot.ethereal@gmail.com> | 2003-12-24 12:46:57 +0000 |
---|---|---|
committer | Olivier Biot <obiot.ethereal@gmail.com> | 2003-12-24 12:46:57 +0000 |
commit | 5663e71bc66fa4c472421e79afde8bbb6cefc551 (patch) | |
tree | 51ab7f7311d397eb51519b7cf9b837e126c24a5c | |
parent | cde3ec1e3321cbc14dde35900148c7815f0eb801 (diff) |
Fix highlighting of Image record (forgot one fixed header byte).
Add comments on computation of fixed header.
svn path=/trunk/; revision=9441
-rwxr-xr-x | packet-image-gif.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/packet-image-gif.c b/packet-image-gif.c index 2d1b150ff8..1bbf25e7cf 100755 --- a/packet-image-gif.c +++ b/packet-image-gif.c @@ -3,7 +3,7 @@ * Routines for image/gif media dissection * Copyright 2003, Olivier Biot <olivier.biot (ad) siemens.com> * - * $Id: packet-image-gif.c,v 1.1 2003/12/24 02:06:26 obiot Exp $ + * $Id: packet-image-gif.c,v 1.2 2003/12/24 12:46:57 obiot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -325,7 +325,10 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) while (offset < tvb_len) { peek = tvb_get_guint8(tvb, offset); if (peek == 0x21) { /* GIF extension block */ - guint32 item_len = 2; + guint32 item_len = 2; /* Fixed header consisting of: + * 1 byte : 0x21 + * 1 byte : extension_label + */ ti = proto_tree_add_item(gif_tree, hf_extension, tvb, offset, 1, TRUE); @@ -349,9 +352,17 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) } while (len > 0); proto_item_set_len(ti, item_len); } else if (peek == 0x2C) { /* Image separator */ - guint32 item_len = 10; proto_tree *subtree2; proto_item *ti2; + guint32 item_len = 11; /* Fixed header consisting of: + * 1 byte : 0x2C + * 2 bytes: image_left + * 2 bytes: image_top + * 2 bytes: image_width + * 2 bytes: image height + * 1 byte : packed bit field + * 1 byte : image code size + */ ti = proto_tree_add_item(gif_tree, hf_image, tvb, offset, 1, TRUE); |