}
static gboolean
-validate_enum_blob (GTypelib *typelib,
+validate_enum_blob (ValidateContext *ctx,
guint32 offset,
guint16 blob_type,
GError **error)
{
+ GTypelib *typelib = ctx->typelib;
EnumBlob *blob;
ValueBlob *v1, *v2;
gint i, j;
"The buffer is too short");
return FALSE;
}
+
+ push_context (ctx, get_string_nofail (typelib, blob->name));
for (i = 0; i < blob->n_values; i++)
{
}
#endif
}
+
+ pop_context (ctx);
return TRUE;
}
if (!validate_name (typelib, "object", typelib->data, blob->name, error))
return FALSE;
-
+
if (blob->parent > header->n_entries)
{
g_set_error (error,
offset2 += 2 * (blob->n_interfaces %2);
+ push_context (ctx, get_string_nofail (typelib, blob->name));
+
for (i = 0; i < blob->n_fields; i++, offset2 += sizeof (FieldBlob))
{
if (!validate_field_blob (typelib, offset2, error))
return FALSE;
}
+ pop_context (ctx);
+
return TRUE;
}
offset2 += 2 * (blob->n_prerequisites % 2);
+ push_context (ctx, get_string_nofail (typelib, blob->name));
+
for (i = 0; i < blob->n_properties; i++, offset2 += sizeof (PropertyBlob))
{
if (!validate_property_blob (typelib, offset2, error))
return FALSE;
}
+ pop_context (ctx);
+
return TRUE;
}
break;
case BLOB_TYPE_ENUM:
case BLOB_TYPE_FLAGS:
- if (!validate_enum_blob (typelib, offset, common->blob_type, error))
+ if (!validate_enum_blob (ctx, offset, common->blob_type, error))
return FALSE;
break;
case BLOB_TYPE_OBJECT: