svn commit: lorikeet r194 - in trunk/ethereal/plugins/pidl: .
tpot at samba.org
tpot at samba.org
Wed Jan 19 11:07:10 GMT 2005
Author: tpot
Date: 2005-01-19 11:07:10 +0000 (Wed, 19 Jan 2005)
New Revision: 194
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=194
Log:
Dissect strings that have the STR_SIZE4 flag as used by WINREG. Ethereal
can now dissect the capture produced by RPC-WINREG, except for the
QueryMultipleValues response (?).
Modified:
trunk/ethereal/plugins/pidl/eparser.c
Changeset:
Modified: trunk/ethereal/plugins/pidl/eparser.c
===================================================================
--- trunk/ethereal/plugins/pidl/eparser.c 2005-01-19 10:19:31 UTC (rev 193)
+++ trunk/ethereal/plugins/pidl/eparser.c 2005-01-19 11:07:10 UTC (rev 194)
@@ -273,8 +273,6 @@
if (len2 > 65535)
return ndr_pull_error(ndr, NDR_ERR_STRING, "bad len offset");
- data = g_malloc(len2*2);
-
item = proto_tree_add_none_format(
tree->proto_tree, hf_string_data, ndr->tvb,
ndr->offset, len2 * 2, "Data");
@@ -289,41 +287,40 @@
}
g_free(s);
- g_free(data);
ndr->offset += len2 * 2;
break;
}
- case LIBNDR_FLAG_STR_SIZE4:
+ case LIBNDR_FLAG_STR_SIZE4: {
+ proto_item *item;
+ char *s;
- g_warning("%d: unimplemented string flags 0x%x",
- ndr->pinfo->fd->num,
- ndr->flags & LIBNDR_STRING_FLAGS);
-
-#if 0
+ ndr_pull_uint32(ndr, tree, hf_string4_len, &len1);
- ndr_pull_uint32(ndr, &len1);
- NDR_PULL_NEED_BYTES(ndr, len1*2);
- if (len1 == 0) {
- *s = talloc_strdup(ndr->mem_ctx, "");
+ if (len1 == 0)
break;
+
+ item = proto_tree_add_none_format(
+ tree->proto_tree, hf_string_data, ndr->tvb,
+ ndr->offset, len1 * 2, "Data");
+
+ s = tvb_fake_unicode(ndr->tvb, ndr->offset, len1, TRUE);
+
+ if (strlen(s) > 0) {
+ proto_item_append_text(item, ": %s", s);
+ if (item && item->parent)
+ proto_item_append_text(
+ item->parent, ": %s", s);
}
- ret = convert_string_talloc(ndr->mem_ctx, chset, CH_UNIX,
- ndr->data+ndr->offset,
- len1*2,
- (const void **)&as);
- if (ret == -1) {
- return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
- "Bad character conversion");
- }
- ndr_pull_advance(ndr, len1*2);
- *s = as;
-#endif
+ g_free(s);
+ ndr->offset += len1 * 2;
+
break;
+ }
case LIBNDR_FLAG_STR_NULLTERM:
More information about the samba-cvs
mailing list