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
This commit is contained in:
Guy Harris 2011-10-12 17:53:58 +00:00
parent 4401bad3cd
commit 9177afaf0c
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}