### Function

# FwupdPlugin byte_array_append_safe

#### Declaration [src]

    gboolean
    fu_byte_array_append_safe (
      GByteArray* array,
      const guint8* buf,
      gsize bufsz,
      gsize offset,
      gsize n,
      GError** error
    )

#### Description [src]

Adds the content of `buf` at `offset` to `array`.

Available since: | 2.1.1

#### Parameters

`array` | An array of `guint8`
| A `GByteArray`.
| The data is owned by the caller of the function.
`buf` | `const guint8*`
| A raw byte buffer.
| The data is owned by the caller of the function.
`bufsz` | `gsize`
| Size of `buf`.
`offset` | `gsize`
| Offset in bytes.
`n` | `gsize`
| Number of bytes.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` if the access is safe, `FALSE` otherwise.