Blame SOURCES/wireshark-0015-CVE-18227.patch

4a42e1
diff --git a/epan/dissectors/packet-mswsp.c b/epan/dissectors/packet-mswsp.c
4a42e1
index 421713067b..295192a0ab 100644
4a42e1
--- a/epan/dissectors/packet-mswsp.c
4a42e1
+++ b/epan/dissectors/packet-mswsp.c
4a42e1
@@ -359,6 +359,7 @@ static int SMB2 = 2;
4a42e1
 
4a42e1
 void proto_reg_handoff_mswsp(void);
4a42e1
 
4a42e1
+static expert_field ei_mswsp_invalid_variant_type = EI_INIT;
4a42e1
 static expert_field ei_missing_msg_context = EI_INIT;
4a42e1
 static expert_field ei_mswsp_msg_cpmsetbinding_ccolumns = EI_INIT;
4a42e1
 
4a42e1
@@ -3068,7 +3069,7 @@ static int parse_lcid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const
4a42e1
 
4a42e1
 /*****************************************************************************************/
4a42e1
 /* 2.2.1.1 CBaseStorageVariant */
4a42e1
-static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CBaseStorageVariant *value, const char *text);
4a42e1
+static int parse_CBaseStorageVariant(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CBaseStorageVariant *value, const char *text);
4a42e1
 
4a42e1
 /* 2.2.1.2 CFullPropSpec */
4a42e1
 static int parse_CFullPropSpec(tvbuff_t *tvb, int offset, proto_tree *tree, proto_tree *pad_tree, struct CFullPropSpec *v, const char *fmt, ...);
4a42e1
@@ -3080,10 +3081,10 @@ static int parse_CContentRestriction(tvbuff_t *tvb, int offset, proto_tree *pare
4a42e1
 static int parse_CNatLanguageRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CNatLanguageRestriction *v, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.6 CNodeRestriction */
4a42e1
-static int parse_CNodeRestriction(tvbuff_t *tvb, int offset, proto_tree *tree, proto_tree *pad_tree, struct CNodeRestriction *v, const char* fmt, ...);
4a42e1
+static int parse_CNodeRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, proto_tree *pad_tree, struct CNodeRestriction *v, const char* fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.7 CPropertyRestriction */
4a42e1
-static int parse_CPropertyRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CPropertyRestriction *v, const char *fmt, ...);
4a42e1
+static int parse_CPropertyRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CPropertyRestriction *v, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.8 CReuseWhere */
4a42e1
 static int parse_CReuseWhere(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree _U_, struct CReuseWhere *v, const char *fmt, ...);
4a42e1
@@ -3092,27 +3093,27 @@ static int parse_CReuseWhere(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 static int parse_CSort(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree _U_, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.12 CCoercionRestriction */
4a42e1
-static int parse_CCoercionRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CCoercionRestriction *v, const char *fmt, ...);
4a42e1
+static int parse_CCoercionRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CCoercionRestriction *v, const char *fmt, ...);
4a42e1
 /* 2.2.1.16 CRestrictionArray */
4a42e1
-static int parse_CRestrictionArray(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CRestrictionArray(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.17 CRestriction */
4a42e1
-static int parse_CRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CRestriction *v, const char *fmt, ...);
4a42e1
+static int parse_CRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CRestriction *v, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.18 CColumnSet */
4a42e1
 static int parse_CColumnSet(tvbuff_t *tvb, int offset, proto_tree *tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.20 CCategorizationSpec */
4a42e1
-static int parse_CCategorizationSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CCategorizationSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.21 CCategSpec */
4a42e1
-static int parse_CCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CCategSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.22 CRangeCategSpec */
4a42e1
-static int parse_CRangeCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CRangeCategSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.23 RANGEBOUNDARY */
4a42e1
-static int parse_RANGEBOUNDARY(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_RANGEBOUNDARY(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.24 CAggregSet */
4a42e1
 static int parse_CAggregSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
@@ -3127,19 +3128,19 @@ static int parse_CSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *parent_tr
4a42e1
 static int parse_CAggregSortKey(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.28 CInGroupSortAggregSets */
4a42e1
-static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.29 CInGroupSortAggregSet */
4a42e1
-static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.30 CDbColId */
4a42e1
 static int parse_CDbColId(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *text);
4a42e1
 
4a42e1
 /* 2.2.1.31 CDbProp */
4a42e1
-static int parse_CDbProp(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct GuidPropertySet *propset, const char *fmt, ...);
4a42e1
+static int parse_CDbProp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct GuidPropertySet *propset, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.32 CDbPropSet */
4a42e1
-static int parse_CDbPropSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
+static int parse_CDbPropSet(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.33 CPidMapper */
4a42e1
 static int parse_CPidMapper(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
@@ -3157,7 +3158,7 @@ static int parse_CRowsetProperties(tvbuff_t *tvb, int offset, proto_tree *parent
4a42e1
 static int parse_CSortSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...);
4a42e1
 
4a42e1
 /* 2.2.1.44 CTableColumn */
4a42e1
-static int parse_CTableColumn(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CTableColumn *col, const char *fmt, ...);
4a42e1
+static int parse_CTableColumn(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CTableColumn *col, const char *fmt, ...);
4a42e1
 
4a42e1
 
4a42e1
 /*
4a42e1
@@ -3231,11 +3232,11 @@ static int parse_CSortSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pr
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CTableColumn(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CTableColumn *col, const char *fmt, ...)
4a42e1
+static int parse_CTableColumn(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CTableColumn *col, const char *fmt, ...)
4a42e1
 {
4a42e1
 
4a42e1
 
4a42e1
-	proto_item *item;
4a42e1
+	proto_item *item, *ti_type;
4a42e1
 	proto_tree *tree;
4a42e1
 	va_list ap;
4a42e1
 	struct vtype_data *type;
4a42e1
@@ -3266,8 +3267,14 @@ static int parse_CTableColumn(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 		}
4a42e1
 	}
4a42e1
 	type = vType_get_type(vtype_val);
4a42e1
-	DISSECTOR_ASSERT(type != NULL);
4a42e1
-	proto_tree_add_string_format_value(tree, hf_mswsp_ctablecolumn_vtype, tvb, offset, 4, type->str, "%s%s", type->str, modifier);
4a42e1
+	if (type == NULL) {
4a42e1
+		/*
4a42e1
+		 * Not a valid type.
4a42e1
+		 */
4a42e1
+		ti_type = proto_tree_add_string(tree, hf_mswsp_ctablecolumn_vtype, tvb, offset, 4, "Unknown CTableColumn type");
4a42e1
+		expert_add_info(pinfo, ti_type, &ei_mswsp_invalid_variant_type);
4a42e1
+	} else
4a42e1
+		proto_tree_add_string_format_value(tree, hf_mswsp_ctablecolumn_vtype, tvb, offset, 4, type->str, "%s%s", type->str, modifier);
4a42e1
 	offset += 4;
4a42e1
 
4a42e1
 	used = tvb_get_guint8(tvb, offset);
4a42e1
@@ -3487,7 +3494,7 @@ static int parse_relop(tvbuff_t *tvb, int offset,  proto_tree *tree, guint32 *re
4a42e1
 	}
4a42e1
 	return offset + 4;
4a42e1
 }
4a42e1
-static int parse_CPropertyRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CPropertyRestriction *v, const char *fmt, ...)
4a42e1
+static int parse_CPropertyRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CPropertyRestriction *v, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -3505,7 +3512,7 @@ static int parse_CPropertyRestriction(tvbuff_t *tvb, int offset, proto_tree *par
4a42e1
 
4a42e1
 	offset = parse_CFullPropSpec(tvb, offset, tree, pad_tree, &v->property, "Property");
4a42e1
 
4a42e1
-	offset = parse_CBaseStorageVariant(tvb, offset, tree, pad_tree, &v->prval, "prval");
4a42e1
+	offset = parse_CBaseStorageVariant(tvb, pinfo, offset, tree, pad_tree, &v->prval, "prval");
4a42e1
 
4a42e1
 	offset = parse_padding(tvb, offset, 4, pad_tree, "padding_lcid");
4a42e1
 
4a42e1
@@ -3517,7 +3524,7 @@ static int parse_CPropertyRestriction(tvbuff_t *tvb, int offset, proto_tree *par
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CCoercionRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CCoercionRestriction *v, const char *fmt, ...)
4a42e1
+static int parse_CCoercionRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CCoercionRestriction *v, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -3535,7 +3542,7 @@ static int parse_CCoercionRestriction(tvbuff_t *tvb, int offset, proto_tree *par
4a42e1
 
4a42e1
 	offset += 4;
4a42e1
 
4a42e1
-	offset = parse_CRestriction(tvb, offset, tree, pad_tree, &v->child, "child");
4a42e1
+	offset = parse_CRestriction(tvb, pinfo, offset, tree, pad_tree, &v->child, "child");
4a42e1
 
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
 	return offset;
4a42e1
@@ -3732,7 +3739,7 @@ static int parse_rType(tvbuff_t *tvb, int offset, proto_tree *tree, enum rType *
4a42e1
 	return offset + 4;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CRestriction *v, const char *fmt, ...)
4a42e1
+static int parse_CRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CRestriction *v, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -3761,18 +3768,18 @@ static int parse_CRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 	case RTProximity:
4a42e1
 	case RTPhrase: {
4a42e1
 		v->u.RTAnd = EP_ALLOC(struct CNodeRestriction);
4a42e1
-		offset = parse_CNodeRestriction(tvb, offset, tree, pad_tree, v->u.RTAnd, "CNodeRestriction");
4a42e1
+		offset = parse_CNodeRestriction(tvb, pinfo, offset, tree, pad_tree, v->u.RTAnd, "CNodeRestriction");
4a42e1
 		break;
4a42e1
 	}
4a42e1
 	case RTNot: {
4a42e1
 		v->u.RTNot = EP_ALLOC(struct CRestriction);
4a42e1
-		offset = parse_CRestriction(tvb, offset, tree, pad_tree,
4a42e1
+		offset = parse_CRestriction(tvb, pinfo, offset, tree, pad_tree,
4a42e1
 									v->u.RTNot, "CRestriction");
4a42e1
 		break;
4a42e1
 	}
4a42e1
 	case RTProperty: {
4a42e1
 		v->u.RTProperty = EP_ALLOC(struct CPropertyRestriction);
4a42e1
-		offset = parse_CPropertyRestriction(tvb, offset, tree, pad_tree,
4a42e1
+		offset = parse_CPropertyRestriction(tvb, pinfo, offset, tree, pad_tree,
4a42e1
 											v->u.RTProperty, "CPropertyRestriction");
4a42e1
 		break;
4a42e1
 	}
4a42e1
@@ -3780,7 +3787,7 @@ static int parse_CRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 	case RTCoerce_Multiply:
4a42e1
 	case RTCoerce_Absolute: {
4a42e1
 		v->u.RTCoerce_Add = EP_ALLOC(struct CCoercionRestriction);
4a42e1
-		offset = parse_CCoercionRestriction(tvb, offset, tree, pad_tree,
4a42e1
+		offset = parse_CCoercionRestriction(tvb, pinfo, offset, tree, pad_tree,
4a42e1
 											v->u.RTCoerce_Add, "CCoercionRestriction");
4a42e1
 		break;
4a42e1
 	}
4a42e1
@@ -3810,7 +3817,7 @@ static int parse_CRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CRestrictionArray(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+static int parse_CRestrictionArray(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	guint8 present, count;
4a42e1
 
4a42e1
@@ -3840,14 +3847,14 @@ static int parse_CRestrictionArray(tvbuff_t *tvb, int offset, proto_tree *parent
4a42e1
 
4a42e1
 		for (i=0; i
4a42e1
 			struct CRestriction r;
4a42e1
-			offset = parse_CRestriction(tvb, offset, tree, pad_tree, &r, "Restriction[%d]", i);
4a42e1
+			offset = parse_CRestriction(tvb, pinfo, offset, tree, pad_tree, &r, "Restriction[%d]", i);
4a42e1
 		}
4a42e1
 	}
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CNodeRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CNodeRestriction *v, const char *fmt, ...)
4a42e1
+static int parse_CNodeRestriction(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CNodeRestriction *v, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -3867,7 +3874,7 @@ static int parse_CNodeRestriction(tvbuff_t *tvb, int offset, proto_tree *parent_
4a42e1
 	for (i=0; i<v->cNode; i++) {
4a42e1
 		struct CRestriction r;
4a42e1
 		ZERO_STRUCT(r);
4a42e1
-		offset = parse_CRestriction(tvb, offset, tree, pad_tree, &r, "paNode[%u]", i);
4a42e1
+		offset = parse_CRestriction(tvb, pinfo, offset, tree, pad_tree, &r, "paNode[%u]", i);
4a42e1
 		offset = parse_padding(tvb, offset, 4, tree, "padding_paNode[%u]", i); /*at begin or end of loop ????*/
4a42e1
 
4a42e1
 	}
4a42e1
@@ -4208,117 +4215,7 @@ static const char *str_CBaseStorageVariant(struct CBaseStorageVariant *value, gb
4a42e1
 	return wmem_strbuf_get_str(strbuf);
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_vType(tvbuff_t *tvb, int offset, guint16 *vtype)
4a42e1
-{
4a42e1
-	guint16 tmp_vtype = tvb_get_letohs(tvb, offset);
4a42e1
-	guint16 modifier =  tmp_vtype & 0xFF00;
4a42e1
-
4a42e1
-	switch (tmp_vtype & 0xFF) {
4a42e1
-		case VT_EMPTY:
4a42e1
-			*vtype = VT_EMPTY;
4a42e1
-			break;
4a42e1
-		case VT_NULL:
4a42e1
-			*vtype = VT_NULL;
4a42e1
-			break;
4a42e1
-		case VT_I2:
4a42e1
-			*vtype = VT_I2;
4a42e1
-			break;
4a42e1
-		case VT_I4:
4a42e1
-			*vtype = VT_I4;
4a42e1
-			break;
4a42e1
-		case VT_R4:
4a42e1
-			*vtype = VT_R4;
4a42e1
-			break;
4a42e1
-		case VT_R8:
4a42e1
-			*vtype = VT_R8;
4a42e1
-			break;
4a42e1
-		case VT_CY:
4a42e1
-			*vtype = VT_CY;
4a42e1
-			break;
4a42e1
-		case VT_DATE:
4a42e1
-			*vtype = VT_DATE;
4a42e1
-			break;
4a42e1
-		case VT_BSTR:
4a42e1
-			*vtype = VT_BSTR;
4a42e1
-			break;
4a42e1
-		case VT_ERROR:
4a42e1
-			*vtype = VT_ERROR;
4a42e1
-			break;
4a42e1
-		case VT_BOOL:
4a42e1
-			*vtype = VT_BOOL;
4a42e1
-			break;
4a42e1
-		case VT_VARIANT:
4a42e1
-			*vtype = VT_VARIANT;
4a42e1
-			break;
4a42e1
-		case VT_DECIMAL:
4a42e1
-			*vtype = VT_DECIMAL;
4a42e1
-			break;
4a42e1
-		case VT_I1:
4a42e1
-			*vtype = VT_I1;
4a42e1
-			break;
4a42e1
-		case VT_UI1:
4a42e1
-			*vtype = VT_UI1;
4a42e1
-			break;
4a42e1
-		case VT_UI2:
4a42e1
-			*vtype = VT_UI2;
4a42e1
-			break;
4a42e1
-		case VT_UI4:
4a42e1
-			*vtype = VT_UI4;
4a42e1
-			break;
4a42e1
-		case VT_I8:
4a42e1
-			*vtype = VT_I8;
4a42e1
-			break;
4a42e1
-		case VT_UI8:
4a42e1
-			*vtype = VT_UI8;
4a42e1
-			break;
4a42e1
-		case VT_INT:
4a42e1
-			*vtype = VT_INT;
4a42e1
-			break;
4a42e1
-		case VT_UINT:
4a42e1
-			*vtype = VT_UINT;
4a42e1
-			break;
4a42e1
-		case VT_LPSTR:
4a42e1
-			*vtype = VT_LPSTR;
4a42e1
-			break;
4a42e1
-		case VT_LPWSTR:
4a42e1
-			*vtype = VT_LPWSTR;
4a42e1
-			break;
4a42e1
-		case VT_COMPRESSED_LPWSTR:
4a42e1
-			*vtype = VT_COMPRESSED_LPWSTR;
4a42e1
-			break;
4a42e1
-		case VT_FILETIME:
4a42e1
-			*vtype = VT_FILETIME;
4a42e1
-			break;
4a42e1
-		case VT_BLOB:
4a42e1
-			*vtype = VT_BLOB;
4a42e1
-			break;
4a42e1
-		case VT_BLOB_OBJECT:
4a42e1
-			*vtype = VT_BLOB_OBJECT;
4a42e1
-			break;
4a42e1
-		case VT_CLSID:
4a42e1
-			*vtype = VT_CLSID;
4a42e1
-			break;
4a42e1
-		default:
4a42e1
-			DISSECTOR_ASSERT(FALSE);
4a42e1
-			break;
4a42e1
-	}
4a42e1
-	if (modifier) {
4a42e1
-		switch (modifier) {
4a42e1
-			case VT_VECTOR:
4a42e1
-				*vtype |= VT_VECTOR;
4a42e1
-				break;
4a42e1
-			case VT_ARRAY:
4a42e1
-				*vtype |= VT_ARRAY;
4a42e1
-				break;
4a42e1
-			default:
4a42e1
-				DISSECTOR_ASSERT(FALSE);
4a42e1
-				break;
4a42e1
-		}
4a42e1
-	}
4a42e1
-	return offset + 2;
4a42e1
-}
4a42e1
-
4a42e1
-static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree _U_, struct CBaseStorageVariant *value, const char *text)
4a42e1
+static int parse_CBaseStorageVariant(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree _U_, struct CBaseStorageVariant *value, const char *text)
4a42e1
 {
4a42e1
 	int i, len;
4a42e1
 	proto_item *ti, *ti_type, *ti_val;
4a42e1
@@ -4329,9 +4226,19 @@ static int parse_CBaseStorageVariant(tvbuff_t *tvb, int offset, proto_tree *pare
4a42e1
 
4a42e1
 	tree = proto_tree_add_subtree(parent_tree, tvb, offset, 0, ett_CBaseStorageVariant, &ti, text);
4a42e1
 
4a42e1
-	parse_vType(tvb, offset, &value->vType);
4a42e1
-	value->type = vType_get_type(value->vType);
4a42e1
-	DISSECTOR_ASSERT(value->type != NULL);
4a42e1
+	value->vType = tvb_get_letohs(tvb, offset);
4a42e1
+	value->type = vType_get_type(value->vType & 0xFF);
4a42e1
+	if (value->type == NULL) {
4a42e1
+		/*
4a42e1
+		 * Not a valid type.
4a42e1
+		 */
4a42e1
+		ti_type = proto_tree_add_string(tree, hf_mswsp_cbasestorvariant_vtype, tvb, offset, 2, "Unknown CBaseStorageVariant type");
4a42e1
+		offset += 2;
4a42e1
+		expert_add_info(pinfo, ti_type, &ei_mswsp_invalid_variant_type);
4a42e1
+
4a42e1
+		THROW_MESSAGE(ReportedBoundsError, "Unknown CBaseStorageVariant type");
4a42e1
+		return offset;
4a42e1
+	}
4a42e1
 
4a42e1
 	ti_type = proto_tree_add_string(tree, hf_mswsp_cbasestorvariant_vtype, tvb, offset, 2, value->type->str);
4a42e1
 	offset += 2;
4a42e1
@@ -4452,7 +4359,7 @@ static int parse_CDbColId(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pr
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CDbProp(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct GuidPropertySet *propset, const char *fmt, ...)
4a42e1
+static int parse_CDbProp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct GuidPropertySet *propset, const char *fmt, ...)
4a42e1
 {
4a42e1
 	static const value_string EMPTY_VS[] = {{0, NULL}};
4a42e1
 	const value_string *vs = (propset && propset->id_map) ? propset->id_map : EMPTY_VS;
4a42e1
@@ -4485,7 +4392,7 @@ static int parse_CDbProp(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pro
4a42e1
 
4a42e1
 	offset = parse_CDbColId(tvb, offset, tree, pad_tree, "colid");
4a42e1
 
4a42e1
-	offset = parse_CBaseStorageVariant(tvb, offset, tree, pad_tree, &value, "vValue");
4a42e1
+	offset = parse_CBaseStorageVariant(tvb, pinfo, offset, tree, pad_tree, &value, "vValue");
4a42e1
 
4a42e1
 	str = str_CBaseStorageVariant(&value, TRUE);
4a42e1
 	proto_item_append_text(item, " %s", str);
4a42e1
@@ -4494,7 +4401,7 @@ static int parse_CDbProp(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pro
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_CDbPropSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+static int parse_CDbPropSet(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	int i, num;
4a42e1
 	e_guid_t guid;
4a42e1
@@ -4530,14 +4437,14 @@ static int parse_CDbPropSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 
4a42e1
 	for (i = 0; i
4a42e1
 		offset = parse_padding(tvb, offset, 4, pad_tree, "aProp[%d]", i);
4a42e1
-		offset = parse_CDbProp(tvb, offset, tree, pad_tree, pset, "aProp[%d]", i);
4a42e1
+		offset = parse_CDbProp(tvb, pinfo, offset, tree, pad_tree, pset, "aProp[%d]", i);
4a42e1
 	}
4a42e1
 
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_PropertySetArray(tvbuff_t *tvb, int offset, int size_offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+static int parse_PropertySetArray(tvbuff_t *tvb, packet_info *pinfo, int offset, int size_offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	const int offset_in = offset;
4a42e1
 	guint32 size, num;
4a42e1
@@ -4563,7 +4470,7 @@ static int parse_PropertySetArray(tvbuff_t *tvb, int offset, int size_offset, pr
4a42e1
 	offset += 4;
4a42e1
 
4a42e1
 	for (i = 0; i < (int)num; i++) {
4a42e1
-		offset = parse_CDbPropSet(tvb, offset, tree, pad_tree, "PropertySet[%d]", i);
4a42e1
+		offset = parse_CDbPropSet(tvb, pinfo, offset, tree, pad_tree, "PropertySet[%d]", i);
4a42e1
 	}
4a42e1
 
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
@@ -4601,7 +4508,7 @@ int parse_CColumnSet(tvbuff_t *tvb, int offset, proto_tree *tree, const char *fm
4a42e1
 }
4a42e1
 
4a42e1
 /* 2.2.1.23 RANGEBOUNDARY */
4a42e1
-int parse_RANGEBOUNDARY(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+int parse_RANGEBOUNDARY(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	guint32 ulType;
4a42e1
 	guint8 labelPresent;
4a42e1
@@ -4622,7 +4529,7 @@ int parse_RANGEBOUNDARY(tvbuff_t *tvb, int offset, proto_tree *parent_tree, prot
4a42e1
 	offset += 4;
4a42e1
 
4a42e1
 	ZERO_STRUCT(prval);
4a42e1
-	offset = parse_CBaseStorageVariant(tvb, offset, tree, pad_tree, &prval, "prVal");
4a42e1
+	offset = parse_CBaseStorageVariant(tvb, pinfo, offset, tree, pad_tree, &prval, "prVal");
4a42e1
 
4a42e1
 	labelPresent = tvb_get_guint8(tvb, offset);
4a42e1
 	proto_tree_add_item(tree, hf_mswsp_rangeboundry_labelpresent, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4a42e1
@@ -4650,7 +4557,7 @@ int parse_RANGEBOUNDARY(tvbuff_t *tvb, int offset, proto_tree *parent_tree, prot
4a42e1
 
4a42e1
 
4a42e1
 /* 2.2.1.22 CRangeCategSpec */
4a42e1
-int parse_CRangeCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+int parse_CRangeCategSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_item *item;
4a42e1
 	proto_tree *tree;
4a42e1
@@ -4671,7 +4578,7 @@ int parse_CRangeCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pr
4a42e1
 	offset += 4;
4a42e1
 
4a42e1
 	for (i=0; i
4a42e1
-		offset = parse_RANGEBOUNDARY(tvb, offset, tree, pad_tree, "aRangeBegin[%u]", i);
4a42e1
+		offset = parse_RANGEBOUNDARY(tvb, pinfo, offset, tree, pad_tree, "aRangeBegin[%u]", i);
4a42e1
 
4a42e1
 	}
4a42e1
 
4a42e1
@@ -4680,7 +4587,7 @@ int parse_CRangeCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, pr
4a42e1
 }
4a42e1
 
4a42e1
 /* 2.2.1.21 CCategSpec */
4a42e1
-int parse_CCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+int parse_CCategSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_item *item;
4a42e1
 	proto_tree *tree;
4a42e1
@@ -4700,7 +4607,7 @@ int parse_CCategSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_t
4a42e1
 
4a42e1
 	offset = parse_CSort(tvb, offset, tree, pad_tree, "CSort");
4a42e1
 
4a42e1
-	offset = parse_CRangeCategSpec(tvb, offset, tree, pad_tree, "CRangeCategSpec");
4a42e1
+	offset = parse_CRangeCategSpec(tvb, pinfo, offset, tree, pad_tree, "CRangeCategSpec");
4a42e1
 
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
 	return offset;
4a42e1
@@ -4867,7 +4774,7 @@ static int parse_CInGroupSortAggregSet_type(tvbuff_t *tvb, int offset, proto_tre
4a42e1
 }
4a42e1
 
4a42e1
 /* 2.2.1.29 CInGroupSortAggregSet */
4a42e1
-static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_item *item;
4a42e1
 	proto_tree *tree;
4a42e1
@@ -4885,7 +4792,7 @@ static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *pa
4a42e1
 
4a42e1
 	if (type == GroupIdValue) {
4a42e1
 		struct CBaseStorageVariant id;
4a42e1
-		offset = parse_CBaseStorageVariant(tvb, offset, tree, pad_tree, &id, "inGroupId");
4a42e1
+		offset = parse_CBaseStorageVariant(tvb, pinfo, offset, tree, pad_tree, &id, "inGroupId");
4a42e1
 	}
4a42e1
 
4a42e1
 	offset = parse_CSortSet(tvb, offset, tree, pad_tree, "SortSet");
4a42e1
@@ -4896,7 +4803,7 @@ static int parse_CInGroupSortAggregSet(tvbuff_t *tvb, int offset, proto_tree *pa
4a42e1
 
4a42e1
 
4a42e1
 /* 2.2.1.28 CInGroupSortAggregSets */
4a42e1
-static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	guint32 cCount, i;
4a42e1
 	proto_item *item;
4a42e1
@@ -4916,7 +4823,7 @@ static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, int offset, proto_tree *p
4a42e1
 
4a42e1
 	for (i=0; i
4a42e1
 		/* 2.2.1.29 CInGroupSortAggregSet */
4a42e1
-		offset = parse_CInGroupSortAggregSet(tvb, offset, tree, pad_tree, "SortSets[%u]", i);
4a42e1
+		offset = parse_CInGroupSortAggregSet(tvb, pinfo, offset, tree, pad_tree, "SortSets[%u]", i);
4a42e1
 	}
4a42e1
 
4a42e1
 	proto_item_set_end(item, tvb, offset);
4a42e1
@@ -4924,7 +4831,7 @@ static int parse_CInGroupSortAggregSets(tvbuff_t *tvb, int offset, proto_tree *p
4a42e1
 }
4a42e1
 
4a42e1
 /* 2.2.1.20 CCategorizationSpec */
4a42e1
-int parse_CCategorizationSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
+int parse_CCategorizationSpec(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, proto_tree *pad_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_item *item;
4a42e1
 	proto_tree *tree;
4a42e1
@@ -4941,7 +4848,7 @@ int parse_CCategorizationSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 	offset = parse_CColumnSet(tvb, offset, tree, "csColumns");
4a42e1
 
4a42e1
 	/* 2.2.1.21 CCategSpec */
4a42e1
-	offset = parse_CCategSpec(tvb, offset, tree, pad_tree, "Spec");
4a42e1
+	offset = parse_CCategSpec(tvb, pinfo, offset, tree, pad_tree, "Spec");
4a42e1
 
4a42e1
 	/* 2.2.1.24 CAggregSet */
4a42e1
 	offset = parse_CAggregSet(tvb, offset, tree, pad_tree, "AggregSet");
4a42e1
@@ -4950,7 +4857,7 @@ int parse_CCategorizationSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree
4a42e1
 	offset = parse_CSortAggregSet(tvb, offset, tree, pad_tree, "SortAggregSet");
4a42e1
 
4a42e1
 	/* 2.2.1.28 CInGroupSortAggregSets */
4a42e1
-	offset = parse_CInGroupSortAggregSets(tvb, offset, tree, pad_tree, "InGroupSortAggregSets");
4a42e1
+	offset = parse_CInGroupSortAggregSets(tvb, pinfo, offset, tree, pad_tree, "InGroupSortAggregSets");
4a42e1
 
4a42e1
 	proto_tree_add_item(tree, hf_mswsp_categorizationspec_cmaxres, tvb, offset, 4, ENC_LITTLE_ENDIAN);
4a42e1
 	offset += 4;
4a42e1
@@ -5273,17 +5180,14 @@ static int parse_CRowVariantArrayInfo(tvbuff_t *tvb, int offset, proto_tree *tre
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_VariantColVector(tvbuff_t *tvb, int offset, proto_tree *tree, guint64 base_address, gboolean is_64bit, struct CRowVariant *variant)
4a42e1
+static int parse_VariantColVector(tvbuff_t *tvb, int offset, proto_tree *tree, guint64 base_address, gboolean is_64bit, struct CRowVariant *variant, struct vtype_data *vt_list_type)
4a42e1
 {
4a42e1
 	guint32 i = 0;
4a42e1
 	guint64 count = 0;
4a42e1
 	int buf_offset = 0;
4a42e1
 	proto_tree *sub_tree;
4a42e1
-	struct vtype_data *vt_list_type =
4a42e1
-		vType_get_type((enum vType)(variant->vtype & 0x00FF));
4a42e1
 	wmem_strbuf_t *strbuf;
4a42e1
 
4a42e1
-	DISSECTOR_ASSERT(vt_list_type != NULL);
4a42e1
 	offset = parse_CRowVariantArrayInfo(tvb, offset, tree, is_64bit, variant);
4a42e1
 	if (is_64bit) {
4a42e1
 		buf_offset =
4a42e1
@@ -5335,10 +5239,10 @@ static int parse_VariantColVector(tvbuff_t *tvb, int offset, proto_tree *tree, g
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_VariantCol(tvbuff_t *tvb, int offset, proto_tree *parent_tree, guint64 base_address, guint32 length _U_, gboolean is_64bit, struct CRowVariant *variant, const char *fmt, ...)
4a42e1
+static int parse_VariantCol(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, guint64 base_address, guint32 length _U_, gboolean is_64bit, struct CRowVariant *variant, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
-	proto_item *item;
4a42e1
+	proto_item *item, *ti_type;
4a42e1
 
4a42e1
 	va_list ap;
4a42e1
 	struct vtype_data *vt_type;
4a42e1
@@ -5354,8 +5258,6 @@ static int parse_VariantCol(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 
4a42e1
 	variant->vtype = tvb_get_letohs(tvb, offset);
4a42e1
 	vt_type = vType_get_type((enum vType)variant->vtype);
4a42e1
-	DISSECTOR_ASSERT(vt_type != NULL);
4a42e1
-
4a42e1
 	vtype_high = (variant->vtype & 0xFF00);
4a42e1
 	if (vtype_high) {
4a42e1
 		if (vtype_high == VT_VECTOR) {
4a42e1
@@ -5367,6 +5269,17 @@ static int parse_VariantCol(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 		}
4a42e1
 	}
4a42e1
 
4a42e1
+	if (vt_type == NULL) {
4a42e1
+		/*
4a42e1
+		 * Not a valid type.
4a42e1
+		 */
4a42e1
+		ti_type = proto_tree_add_string(tree, hf_mswsp_ctablecolumn_vtype, tvb, offset, 4, "Unknown variant column type");
4a42e1
+		expert_add_info(pinfo, ti_type, &ei_mswsp_invalid_variant_type);
4a42e1
+		offset += 2;
4a42e1
+
4a42e1
+		THROW_FORMATTED(ReportedBoundsError, "Unknown variant column type%s", modifier);
4a42e1
+		return offset;
4a42e1
+	}
4a42e1
 	proto_tree_add_string_format_value(tree, hf_mswsp_rowvariant_vtype, tvb, offset, 2, vt_type->str, "%s%s", vt_type->str, modifier);
4a42e1
 	offset += 2;
4a42e1
 
4a42e1
@@ -5382,7 +5295,7 @@ static int parse_VariantCol(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 
4a42e1
 	if (vtype_high == VT_VECTOR || vtype_high == VT_ARRAY) {
4a42e1
 		offset = parse_VariantColVector(tvb, offset, tree, base_address,
4a42e1
-										is_64bit, variant);
4a42e1
+										is_64bit, variant, vt_type);
4a42e1
 	} else {
4a42e1
 		wmem_strbuf_t *strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
4a42e1
 		if (size != -1) {
4a42e1
@@ -5421,7 +5334,7 @@ static int parse_VariantCol(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_RowsBufferCol(tvbuff_t *tvb, int offset, guint32 row, guint32 col, struct CPMSetBindingsIn *bindingsin, struct rows_data *rowsin, gboolean b_is_64bit, proto_tree *parent_tree, const char *fmt, ...)
4a42e1
+static int parse_RowsBufferCol(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 row, guint32 col, struct CPMSetBindingsIn *bindingsin, struct rows_data *rowsin, gboolean b_is_64bit, proto_tree *parent_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -5463,13 +5376,13 @@ static int parse_RowsBufferCol(tvbuff_t *tvb, int offset, guint32 row, guint32 c
4a42e1
 			len = tvb_get_letohs(tvb, buf_offset + pcol->lengthoffset) - pcol->valuesize;
4a42e1
 		}
4a42e1
 		if (pcol->vtype == VT_VARIANT) {
4a42e1
-			parse_VariantCol(tvb, tmp_offset, tree, base_address, len, b_is_64bit, &variant, "CRowVariant");
4a42e1
+			parse_VariantCol(tvb, pinfo, tmp_offset, tree, base_address, len, b_is_64bit, &variant, "CRowVariant");
4a42e1
 		}
4a42e1
 	}
4a42e1
 	return offset;
4a42e1
 }
4a42e1
 
4a42e1
-static int parse_RowsBuffer(tvbuff_t *tvb, int offset, guint32 num_rows, struct CPMSetBindingsIn *bindingsin, struct rows_data *rowsin, gboolean is64bit, proto_tree *parent_tree, const char *fmt, ...)
4a42e1
+static int parse_RowsBuffer(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 num_rows, struct CPMSetBindingsIn *bindingsin, struct rows_data *rowsin, gboolean is64bit, proto_tree *parent_tree, const char *fmt, ...)
4a42e1
 {
4a42e1
 	proto_tree *tree;
4a42e1
 	proto_item *item;
4a42e1
@@ -5488,7 +5401,7 @@ static int parse_RowsBuffer(tvbuff_t *tvb, int offset, guint32 num_rows, struct
4a42e1
 		proto_tree *row_tree;
4a42e1
 		row_tree = proto_tree_add_subtree_format(tree, tvb, offset, 0, ett_GetRowsRow, NULL, "Row[%d]", num);
4a42e1
 		for (col = 0; col < bindingsin->ccolumns; col++) {
4a42e1
-			parse_RowsBufferCol(tvb, offset, num, col, bindingsin, rowsin, is64bit, row_tree, "Col[%d]", col);
4a42e1
+			parse_RowsBufferCol(tvb, pinfo, offset, num, col, bindingsin, rowsin, is64bit, row_tree, "Col[%d]", col);
4a42e1
 		}
4a42e1
 	}
4a42e1
 	return offset;
4a42e1
@@ -5557,11 +5470,11 @@ static int dissect_CPMConnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *par
4a42e1
 
4a42e1
 		offset = parse_padding(tvb, offset, 8, pad_tree, "_paddingcPropSets");
4a42e1
 
4a42e1
-		offset = parse_PropertySetArray(tvb, offset, blob_size1_off, tree, pad_tree, "PropSets");
4a42e1
+		offset = parse_PropertySetArray(tvb, pinfo, offset, blob_size1_off, tree, pad_tree, "PropSets");
4a42e1
 
4a42e1
 		offset = parse_padding(tvb, offset, 8, pad_tree, "paddingExtPropset");
4a42e1
 
4a42e1
-		offset = parse_PropertySetArray(tvb, offset, blob_size2_off, tree, pad_tree, "ExtPropset");
4a42e1
+		offset = parse_PropertySetArray(tvb, pinfo, offset, blob_size2_off, tree, pad_tree, "ExtPropset");
4a42e1
 
4a42e1
 		offset = parse_padding(tvb, offset, 8, pad_tree, "???");
4a42e1
 
4a42e1
@@ -5616,7 +5529,7 @@ static int dissect_CPMCreateQuery(tvbuff_t *tvb, packet_info *pinfo, proto_tree
4a42e1
 		offset += 1;
4a42e1
 
4a42e1
 		if (CRestrictionPresent) {
4a42e1
-			offset = parse_CRestrictionArray(tvb, offset, tree, pad_tree, "RestrictionArray");
4a42e1
+			offset = parse_CRestrictionArray(tvb, pinfo, offset, tree, pad_tree, "RestrictionArray");
4a42e1
 		}
4a42e1
 
4a42e1
 		CSortSetPresent = tvb_get_guint8(tvb, offset);
4a42e1
@@ -5625,7 +5538,7 @@ static int dissect_CPMCreateQuery(tvbuff_t *tvb, packet_info *pinfo, proto_tree
4a42e1
 
4a42e1
 		if (CSortSetPresent) {
4a42e1
 			offset = parse_padding(tvb, offset, 4, tree, "paddingCSortSetPresent");
4a42e1
-			offset = parse_CInGroupSortAggregSets(tvb, offset, tree, pad_tree, "GroupSortAggregSets");
4a42e1
+			offset = parse_CInGroupSortAggregSets(tvb, pinfo, offset, tree, pad_tree, "GroupSortAggregSets");
4a42e1
 
4a42e1
 		}
4a42e1
 
4a42e1
@@ -5641,7 +5554,7 @@ static int dissect_CPMCreateQuery(tvbuff_t *tvb, packet_info *pinfo, proto_tree
4a42e1
 			proto_tree_add_uint(tree, hf_mswsp_msg_cpmcreatequery_ccateg_count, tvb, offset, 4, count);
4a42e1
 			offset += 4;
4a42e1
 			for (i=0; i
4a42e1
-				offset = parse_CCategorizationSpec(tvb, offset, tree, pad_tree, "categories[%u]", i);
4a42e1
+				offset = parse_CCategorizationSpec(tvb, pinfo, offset, tree, pad_tree, "categories[%u]", i);
4a42e1
 			}
4a42e1
 		}
4a42e1
 
4a42e1
@@ -5803,7 +5716,7 @@ static int dissect_CPMGetRows(tvbuff_t *tvb, packet_info *pinfo, proto_tree *par
4a42e1
 		if (b_has_arch && bindingsin && rowsin) {
4a42e1
 			offset = parse_padding(tvb, offset, rowsin->cbreserved, pad_tree,
4a42e1
 								   "paddingRows");
4a42e1
-			parse_RowsBuffer(tvb, offset, num_rows, bindingsin, rowsin, b_64bit_mode, tree, "Rows");
4a42e1
+			parse_RowsBuffer(tvb, pinfo, offset, num_rows, bindingsin, rowsin, b_64bit_mode, tree, "Rows");
4a42e1
 		} else {
4a42e1
 			gint nbytes = tvb_reported_length_remaining(tvb, offset);
4a42e1
 			proto_tree_add_expert_format(tree, pinfo, &ei_missing_msg_context, tvb, offset, nbytes, "Undissected %d bytes (due to missing preceding msg(s))", nbytes);
4a42e1
@@ -5950,7 +5863,7 @@ static int dissect_CPMSetBindings(tvbuff_t *tvb, packet_info *pinfo, proto_tree
4a42e1
 						   sizeof(struct CTableColumn) * num);
4a42e1
 		for (n=0; n
4a42e1
 			offset = parse_padding(tvb, offset, 4, pad_tree, "padding_aColumns[%u]", n);
4a42e1
-			offset = parse_CTableColumn(tvb, offset, tree, pad_tree, &request.acolumns[n],"aColumns[%u]", n);
4a42e1
+			offset = parse_CTableColumn(tvb, pinfo, offset, tree, pad_tree, &request.acolumns[n],"aColumns[%u]", n);
4a42e1
 		}
4a42e1
 		data = find_or_create_message_data(ct, pinfo,0xD0,in, private_data);
4a42e1
 		if (data) {
4a42e1
@@ -8051,6 +7964,7 @@ proto_register_mswsp(void)
4a42e1
 	};
4a42e1
 
4a42e1
 	static ei_register_info ei[] = {
4a42e1
+		{ &ei_mswsp_invalid_variant_type, { "mswsp.invalid_variant_type", PI_PROTOCOL, PI_ERROR, "Invalid variant type", EXPFILL }},
4a42e1
 		{ &ei_missing_msg_context, { "mswsp.msg.cpmgetrows.missing_msg_context", PI_SEQUENCE, PI_WARN, "previous messages needed for context not captured", EXPFILL }},
4a42e1
 		{ &ei_mswsp_msg_cpmsetbinding_ccolumns, { "mswsp.msg.cpmsetbinding.ccolumns.invalude", PI_PROTOCOL, PI_WARN, "Invalid number of cColumns for packet", EXPFILL }}
4a42e1
 	};