4 bytes - length, then char data */
#define OUT_RXString(field) \
{ guint32 i_orxs,len_orxs; \
- char *tmp_orxs; \
- const guint8 *p_orxs; \
i_orxs = tvb_get_ntohl(tvb, offset); \
- offset += 4; \
- p_orxs = tvb_get_ptr(tvb,offset,i_orxs); \
- len_orxs = ((i_orxs+4-1)/4)*4; \
- tmp_orxs = ep_alloc(i_orxs+1); \
- memcpy(tmp_orxs, p_orxs, i_orxs); \
- tmp_orxs[i_orxs] = '\0'; \
- proto_tree_add_string(tree, field, tvb, offset-4, len_orxs+4, \
- (void *)tmp_orxs); \
+ len_orxs = ((i_orxs+4-1)/4)*4 + 4; \
+ proto_tree_add_item(tree, field, tvb, offset-4, len_orxs, \
+ FALSE); \
offset += len_orxs; \
}
OUT_RXString(hf_afs_kauth_realm); \
}
-#define GETSTR ((const char *)tvb_get_ptr(tvb,offset,tvb_ensure_length_remaining(tvb,offset)))
+#define MAX_GETSTR_LEN 200 /* Arbitrary */
+#define GETSTR (tvb_format_text(tvb,offset,tvb_length_remaining(tvb,offset)))
#define VALID_OPCODE(opcode) ((opcode >= OPCODE_LOW && opcode <= OPCODE_HIGH) || \
(opcode >= VOTE_LOW && opcode <= VOTE_HIGH) || \