summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2024-02-20 03:59:03 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2024-02-20 17:57:46 +0100
commit18e2906d626663cca00f8be58a51b4a32961feb1 (patch)
tree1a96534423f3e92ea98430b6ba4fb0813b54f35f
parent19806546a2d14c2c0c8a188628faa5686336df5c (diff)
fpi-byte-writer: Initialize the parent size when initializing with size
-rw-r--r--libfprint/fpi-byte-writer.c2
1 files changed, 2 insertions, 0 deletions
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;