From 18e2906d626663cca00f8be58a51b4a32961feb1 Mon Sep 17 00:00:00 2001 From: "Marco Trevisan (TreviƱo)" Date: Tue, 20 Feb 2024 03:59:03 +0100 Subject: fpi-byte-writer: Initialize the parent size when initializing with size --- libfprint/fpi-byte-writer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfprint/fpi-byte-writer.c b/libfprint/fpi-byte-writer.c index 73e42cb..2f55fcf 100644 --- a/libfprint/fpi-byte-writer.c +++ b/libfprint/fpi-byte-writer.c @@ -76,6 +76,7 @@ fpi_byte_writer_new_with_size (guint size, gboolean fixed) ret->alloc_size = size; ret->parent.data = g_malloc (ret->alloc_size); + ret->parent.size = size; ret->fixed = fixed; ret->owned = TRUE; @@ -143,6 +144,7 @@ fpi_byte_writer_init_with_size (FpiByteWriter * writer, guint size, fpi_byte_writer_init (writer); writer->parent.data = g_malloc (size); + writer->parent.size = size; writer->alloc_size = size; writer->fixed = fixed; writer->owned = TRUE; -- cgit v1.2.3