From 36fd5599e7c67f9d99046aa1570e7f0d308b7092 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 1 Nov 2022 23:04:36 -0400 Subject: Avoid error in gcc's address sanitizer Pretty sure this is a false positive, but it's few enough members that it doesn't hurt too much to reset them all explicitly anyway. --- src/sratom.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/sratom.c b/src/sratom.c index b834313..f9799d8 100644 --- a/src/sratom.c +++ b/src/sratom.c @@ -844,7 +844,15 @@ sratom_read(Sratom* sratom, sord_node_free(world, sratom->nodes.atom_frameTime); sord_node_free(world, sratom->nodes.atom_beatTime); sord_node_free(world, sratom->nodes.atom_childType); - memset(&sratom->nodes, 0, sizeof(sratom->nodes)); + + sratom->nodes.xsd_base64Binary = NULL; + sratom->nodes.rdf_value = NULL; + sratom->nodes.rdf_type = NULL; + sratom->nodes.rdf_rest = NULL; + sratom->nodes.rdf_first = NULL; + sratom->nodes.atom_beatTime = NULL; + sratom->nodes.atom_frameTime = NULL; + sratom->nodes.atom_childType = NULL; } LV2_Atom_Forge_Ref -- cgit v1.2.1