diff --gita/epan/dissectors/packet-cups.cb/epan/dissectors/packet-cups.c
index190541e..7f7f4b9100644(file)
--- a/epan/dissectors/packet-cups.c
+++ b/epan/dissectors/packet-cups.c
@@-279,7+279,7@@get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len)
         if (o != -1) {
             offset++;
             l = o - offset;
-            s = tvb_get_ptr(tvb, offset, l);
+            s = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
             offset = o + 1;
         }
     }
@@-300,7+300,7@@get_unquoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len)
     o = tvb_pbrk_guint8(tvb, offset, -1, " \t\r\n", NULL);
     if (o != -1) {
         l = o - offset;
-        s = tvb_get_ptr(tvb, offset, l);
+        s = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, l, ENC_ASCII);
         offset = o;
     }
 
