Wireshark-dev: [Wireshark-dev] Documentation error in README.dissector?
From: Paul Offord <[email protected]>
Date: Sat, 6 Aug 2016 10:16:47 +0000



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




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


This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com