From 6b7c43d4126dc61b154b97554e5ad2cf7b038b06 Mon Sep 17 00:00:00 2001 From: Will Toohey Date: Mon, 30 Jun 2025 19:39:28 +1000 Subject: [PATCH] avs: fix off-by-1 on bin2xml string allocation --- src/avs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/avs.cpp b/src/avs.cpp index 836d54e..4c29573 100644 --- a/src/avs.cpp +++ b/src/avs.cpp @@ -341,7 +341,7 @@ property_t prop_from_file_path(string const&path) { char* prop_to_xml_string(property_t prop, rapidxml::xml_document<>& allocator) { auto prop_size = property_query_size(prop); - char* xml = allocator.allocate_string(NULL, prop_size); + char* xml = allocator.allocate_string(NULL, prop_size + 1); auto written = property_mem_write(prop, xml, prop_size); if (written > 0) {