diff options
author | João Valverde <j@v6e.pt> | 2022-10-03 22:03:07 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-10-10 20:27:33 +0000 |
commit | 597f020793bdbfa7fc3d9f6b86a596da61e4171f (patch) | |
tree | bb14be9ab73df1f3200648d472429f12cadd3f79 /doc | |
parent | 1b12dc4b9e856f2b993134606320157493b99521 (diff) |
epan: Mark tvb_get_const_stringz() as deprecated
The function tvb_get_const_stringz() does not check for a string
encoding and returns a pointer to a byte array. For this reason
it should not be used. Prefer other functions that return a
valid UTF-8 string from a source encoding or use tvb_get_ptr()
to fetch a byte pointer.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.dissector | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index cf1f0b7b78..6a28b63e4a 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -463,20 +463,6 @@ the string, including the terminating null. The buffer is allocated in the given wmem scope (see README.wmem for more information). -const guint8 *tvb_get_const_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); - -Returns a null-terminated const buffer containing data from the -specified tvbuff, starting at the specified offset, and containing all -bytes 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. - -You do not need to free() this buffer; it will happen automatically once -the next packet is dissected. This function is slightly more efficient -than the others because it does not allocate memory and copy the string, -but it does not do any mapping to UTF-8 or checks for valid octet -sequences. - 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); |