From 2f2edf9c364e8a0c6c81e542edd1da866927161d Mon Sep 17 00:00:00 2001 From: kibook Date: Thu, 26 Dec 2024 08:33:55 -0500 Subject: [PATCH] s1kd-validate: Shallow copy nodes to XML report Changed the way nodes are copied to the XML report so that it will only be a shallow copy of the node (only attributes, no children). This mimics the s1kd-brexcheck XML report, and prevents the report from becoming very large if a node with a lot of content is reported. --- tools/s1kd-validate/s1kd-validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/s1kd-validate/s1kd-validate.c b/tools/s1kd-validate/s1kd-validate.c index ebbb6b93..c6627b6c 100644 --- a/tools/s1kd-validate/s1kd-validate.c +++ b/tools/s1kd-validate/s1kd-validate.c @@ -7,7 +7,7 @@ #include "s1kd_tools.h" #define PROG_NAME "s1kd-validate" -#define VERSION "4.1.0" +#define VERSION "4.1.1" #define ERR_PREFIX PROG_NAME ": ERROR: " #define SUCCESS_PREFIX PROG_NAME ": SUCCESS: " @@ -104,7 +104,7 @@ static void add_xml_report_error(const xmlNodePtr report_node, const xmlNodePtr xpath = xpath_of(node); xmlSetProp(object, BAD_CAST "xpath", xpath); - xmlAddChild(object, xmlCopyNode(node, 1)); + xmlAddChild(object, xmlCopyNode(node, 2)); xmlFree(xpath); }