diff options
-rw-r--r-- | epan/charsets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/charsets.c b/epan/charsets.c index d713c45dfe..1973039c6f 100644 --- a/epan/charsets.c +++ b/epan/charsets.c @@ -1430,7 +1430,7 @@ get_t61_string(wmem_allocator_t *scope, const guint8 *ptr, gint length) for (i = 0, c = ptr; i < length; c++, i++) { if (!t61_tab[*c]) { wmem_strbuf_append_unichar(strbuf, UNREPL); - } else if ((*c & 0xf0) == 0xc0) { + } else if (i < length - 1 && (*c & 0xf0) == 0xc0) { gint j = *c & 0x0f; /* If this is the end of the string, or if the base * character is just a space, treat this as a regular |