forked from osmocom/wireshark
giop: ignore NULL-terminator in CDR strings
CDR strings appear to be both counted *and* NULL-terminated in many cases, which is rather weird, so if we see a NULL-terminator, ignore it in the count; otherwise we print a trailing '\000' on all the strings we put in the tree. Bug: 11126 Change-Id: I45b6b414683a6f646d37c2e2001b7319d5c80be5 Reviewed-on: https://code.wireshark.org/review/8390 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
e997aaabe9
commit
f1e736772b
|
@ -3342,6 +3342,9 @@ guint32 get_CDR_string(tvbuff_t *tvb, const gchar **seq, int *offset, gboolean s
|
|||
}
|
||||
else if (slength > 0) {
|
||||
get_CDR_octet_seq(tvb, seq, offset, slength);
|
||||
if (*seq[slength-1] == '\0') {
|
||||
slength--;
|
||||
}
|
||||
} else {
|
||||
*seq = wmem_strdup(wmem_packet_scope(), ""); /* zero-length string */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue