diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 5b6cf91b..b3e03d88 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -1313,13 +1313,9 @@ vips_block_untrusted_set_operation( VipsOperationClass *class, gboolean *state ) { g_assert( VIPS_IS_OPERATION_CLASS( class ) ); - if( class->flags & VIPS_OPERATION_UNTRUSTED ) { - GTypeClass *type_class = (GTypeClass *) class; - GType gtype = type_class->g_type; - const char *name = g_type_name( gtype ); - - vips_operation_block_set( name, *state ); - } + if( class->flags & VIPS_OPERATION_UNTRUSTED ) + vips_operation_block_set( G_OBJECT_CLASS_NAME( class ), + *state ); return( NULL ); } diff --git a/libvips/iofuncs/operation.c b/libvips/iofuncs/operation.c index 5c97e548..cffbae94 100644 --- a/libvips/iofuncs/operation.c +++ b/libvips/iofuncs/operation.c @@ -196,9 +196,10 @@ * @VIPS_OPERATION_DEPRECATED means this is an old operation kept in vips for * compatibility only and should be hidden from users. * - * @VIPS_OPERATION_UNTRUSTED means the operation depends on external libraries which have - * not been hardened against attack. It should probably not be used on untrusted input. - * Use vips_operation_block_untrusted() to block all untrusted operations. + * @VIPS_OPERATION_UNTRUSTED means the operation depends on external libraries + * which have not been hardened against attack. It should probably not be used + * on untrusted input. Use vips_block_untrusted_set() to block all + * untrusted operations. * * @VIPS_OPERATION_BLOCKED means the operation is prevented from executing. Use * vips_operation_block_set() to enable and disable groups of operations.