forked from osmocom/wireshark
epan: Fixup get_ascii_string change
prev needs to be advanced to ptr on an invalid character even
if there aren't any bytes to copy (because we have two invalid
characters in a row.) Fixup ba7917309a
Fix #18769.
This commit is contained in:
parent
2ce57fcc19
commit
67db53abbf
|
@ -85,9 +85,9 @@ get_ascii_string(wmem_allocator_t *scope, const guint8 *ptr, gint length)
|
|||
} else {
|
||||
if (valid_bytes) {
|
||||
wmem_strbuf_append_len(str, prev, valid_bytes);
|
||||
prev = ptr;
|
||||
valid_bytes = 0;
|
||||
}
|
||||
prev = ptr;
|
||||
wmem_strbuf_append_unichar_repl(str);
|
||||
}
|
||||
length--;
|
||||
|
|
Loading…
Reference in New Issue