Wireshark-dev: Re: [Wireshark-dev] Documentation error in README.dissector?
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Mon, 8 Aug 2016 23:48:20 +0200
Hi,

Yes, you could raise a bug. Or try to submit a change rewording this text.

Thanks,
Jaap


On 06-08-16 12:16, Paul Offord wrote:
> Hi,
> 
>  
> 
> README.dissector describes two accessor functions that access null terminated
> strings and return the string length.  The document says:
> 
>  
> 
> -----------------
> 
> gint tvb_get_nstringz(tvbuff_t *tvb, const gint offset, const guint bufsize,
> guint8* buffer);
> 
> gint tvb_get_nstringz0(tvbuff_t *tvb, const gint offset, const guint bufsize,
> guint8* buffer);
> 
>  
> 
> Returns a null-terminated buffer containing data from the specified tvbuff,
> 
> starting at the specified offset, and containing all characters from the
> 
> tvbuff up to and including a terminating null character in the tvbuff.
> 
> "*lengthp" will be set to the length of the string, including the terminating
> 
> null.
> 
> -----------------
> 
>  
> 
> I think these notes have been incorrectly copied and pasted from similar
> functions above this point in the doc.  Three particular points:
> 
>  
> 
> 1.       We pass the address of the buffer we want to use as a parameter
> 
> 2.      The value returned in the string length
> 
> 3.      The length returned doesn’t include the  null terminator
> 
>  
> 
> Am I right?  Should I raise a bug?
> 
>  
> 
> Thanks and regards…Paul
>