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:
John Thacker 2022-12-29 22:44:37 -05:00
parent 2ce57fcc19
commit 67db53abbf
1 changed files with 1 additions and 1 deletions

View File

@ -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--;