diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-10-12 17:53:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-10-12 17:53:58 +0000 |
commit | 9177afaf0ca37f9279bda9c09305b7b2dae92087 (patch) | |
tree | fa728f7b3a97320d848ce9451cbd055c086d3916 /epan/dissectors/packet-ajp13.c | |
parent | 4401bad3cd7435c2d9ce0b0845ac62a7359ce7e0 (diff) |
From Iain Arnell:
Revision 35984 introduced a regression in ajp13_get_nstring. According
to the comments here, the returned length _includes_ the trailing null.
The encoded length, however, does _not_ including the trailing null.
This patch resolves the problem by simply adding 1 to the returned
length.
svn path=/trunk/; revision=39388
Diffstat (limited to 'epan/dissectors/packet-ajp13.c')
-rw-r--r-- | epan/dissectors/packet-ajp13.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c index 9b0ac3cc67..b579821b98 100644 --- a/epan/dissectors/packet-ajp13.c +++ b/epan/dissectors/packet-ajp13.c @@ -254,7 +254,7 @@ ajp13_get_nstring(tvbuff_t *tvb, gint offset, guint16* ret_len) len = tvb_get_ntohs(tvb, offset); if (ret_len) - *ret_len = len; + *ret_len = len+1; return tvb_format_text(tvb, offset+2, MIN(len, ITEM_LABEL_LENGTH)); } |