diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-07-14 19:46:31 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-07-15 02:47:15 +0000 |
commit | 258a5f6a173f7ae5fa9ccf9e709b22bbaa4f190b (patch) | |
tree | 32eff5ca780f61894ecfd4f9dfa72568a3e8a737 /epan/tvbuff.c | |
parent | e5efd68d3bbaa17add911103bb388c6ad09a8047 (diff) |
Add support for code pages 855 and 856 for FT_STRINGZ strings.
Clean up some comments while we're at it.
Change-Id: I0cd014bf1d1e7dc740eac1721d5466377938655f
Reviewed-on: https://code.wireshark.org/review/33939
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 5d87dda873..ea9e1ffacb 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -2485,7 +2485,7 @@ tvb_format_stringzpad_wsp(wmem_allocator_t* allocator, tvbuff_t *tvb, const gint */ /* - * Given a wmem scope, tvbuff, an offset, and a length, treat the string + * Given a wmem scope, a tvbuff, an offset, and a length, treat the string * of bytes referred to by the tvbuff, offset, and length as an ASCII string, * with all bytes with the high-order bit set being invalid, and return a * pointer to a UTF-8 string, allocated using the wmem scope. @@ -2522,7 +2522,7 @@ tvb_get_utf_8_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, } /* - * Given a wmem scope, tvbuff, an offset, and a length, treat the string + * Given a wmem scope, a tvbuff, an offset, and a length, treat the string * of bytes referred to by the tvbuff, the offset, and the length as a * raw string, and return a pointer to that string, allocated using the * wmem scope. This means a null is appended at the end, but no replacement @@ -3228,6 +3228,14 @@ tvb_get_stringz_enc(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, g strptr = tvb_get_stringz_unichar2(scope, tvb, offset, lengthp, charset_table_cp437); break; + case ENC_CP855: + strptr = tvb_get_stringz_unichar2(scope, tvb, offset, lengthp, charset_table_cp855); + break; + + case ENC_CP866: + strptr = tvb_get_stringz_unichar2(scope, tvb, offset, lengthp, charset_table_cp866); + break; + case ENC_3GPP_TS_23_038_7BITS: REPORT_DISSECTOR_BUG("TS 23.038 7bits has no null character and doesn't support null-terminated strings"); break; |