FwupdPlugin.Firmware.add_patch

### Method

# FwupdPlugin Firmwareadd_patch

since: 1.7.4

#### Declaration [src]

    void
    fu_firmware_add_patch (
      FuFirmware* self,
      gsize offset,
      GBytes* blob
    )

#### Description [src]

Adds a byte patch at a specific offset. If a patch already exists at the specified address then it is replaced.

If the `address` is larger than the size of the image then an error is returned.

Available since: 1.7.4

#### Parameters

`offset`

  Type: `gsize`

  An address smaller than fu_firmware_get_size().

`blob`

  Type: `GBytes`

  Bytes to replace.

  The data is owned by the caller of the method.