### Function

# FwupdPlugin strsafe_bytes

since: 2.0.2

#### Declaration [src]

    gchar*
    fu_strsafe_bytes (
      GBytes* blob,
      gsize maxsz
    )

#### Description [src]

Converts a `GBytes` into something that can be safely printed.

Available since: 2.0.2

#### Parameters

`blob`

  Type: `GBytes`

  A `GBytes`.

  The data is owned by the caller of the function.

`maxsz`

  Type: `gsize`

  Maximum size of returned string.

#### Return value

Type: `gchar*`

Safe string, or `NULL` if there was nothing valid.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.