search for: xmltextwriterwritebase64

Displaying 13 results from an estimated 13 matches for "xmltextwriterwritebase64".

2011 Sep 02
1
[PATCH 6/7] hivexml: Report attributes in values instead of text.
...riter)); end_value (writer); return 0; } @@ -332,7 +335,9 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node, } start_value (writer, key, type, "base64"); + XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len)); + XML_CHECK (xmlTextWriterEndAttribute, (writer)); end_value (writer); return 0; @@ -344,7 +349,7 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; start_value (writer, k...
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...st char *type; + int ret = 0; switch (t) { case hive_t_string: type = "bad-string"; break; @@ -353,9 +429,10 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node, XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len)); XML_CHECK (xmlTextWriterEndAttribute, (writer)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -363,10 +440,12 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,...
2011 Dec 13
1
[hivex] [PATCH 1/1] hivexml: Change value type output to standard names
...riter_v, hive_node_h node, type = "unknown"; } - start_value (writer, key, type, "base64"); + start_value (writer, key, value_type_windows_string (t), "base64"); XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len)); XML_CHECK (xmlTextWriterEndAttribute, (writer)); @@ -364,7 +390,7 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, hive_type t, size_t len, const char *key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer...
2012 Feb 01
1
[PATCH] hivexml
...base64"); > XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); > - XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str)); > + if (validXML) > + XML_CHECK (xmlTextWriterWriteString, (writer, BAD_CAST str)); > + else > + XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, strlen(str))); > + > XML_CHECK (xmlTextWriterEndAttribute, (writer)); > end_value (writer); > return 0; > @@ -310,9 +346,14 @@ value_multiple_strings (hive_h *h, void > > size_t i; > for (i = 0; argv[i] != NULL; ++i) { > - XML_CHECK (x...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...st char *type; + int ret = 0; switch (t) { case hive_t_string: type = "bad-string"; break; @@ -354,9 +429,10 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node, XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len)); XML_CHECK (xmlTextWriterEndAttribute, (writer)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -364,10 +440,12 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,...
2016 Mar 07
0
[PATCH] inspector: add --no-applications and --no-icon
...amp;size, + GUESTFS_INSPECT_GET_ICON_FAVICON, 0, + -1); + if (!str) exit (EXIT_FAILURE); + if (size > 0) { + XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "icon")); + XMLERROR (-1, xmlTextWriterWriteBase64 (xo, str, 0, size)); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + /* Note we must free (str) even if size == 0, because that indicates + * there was no icon. + */ + free (str); + } - /* Don't return favicon. RHEL 7 and Fedora have crappy 16x16 -...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...string: type = "bad-string"; break; @@ -332,10 +408,13 @@ value_string_invalid_utf16 (hive_h *h, void *writer_v, hive_node_h node, } start_value (writer, key, type, "base64"); + XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST "value")); XML_CHECK (xmlTextWriterWriteBase64, (writer, str, 0, len)); + XML_CHECK (xmlTextWriterEndAttribute, (writer)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -343,10 +422,12 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value,...
2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
...me, BAD_CAST attr_data)); + else if (strcmp (encoding_to_use, "base64") == 0) { + XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST attr_encoding, BAD_CAST "base64")); + XML_CHECK (xmlTextWriterStartAttribute, (writer, BAD_CAST attr_name)); + XML_CHECK (xmlTextWriterWriteBase64, (writer, BAD_CAST attr_data, 0, strlen(attr_data))); + XML_CHECK (xmlTextWriterEndAttribute, (writer)); + } else { + fprintf (stderr, "safe_print_string_attribute: Unexpected encoding to use (won't print here).\n"); + ret = -1; + } + } else + ret = -1; + ret...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...\ } while (0) +/** + * To write a string encoded as base64: + * + * base64 (data, size); + */ +#define base64(data, size) \ + do { \ + if (xmlTextWriterWriteBase64 (xo, (data), 0, (size)) == -1) { \ + xml_error ("xmlTextWriterWriteBase64"); \ + } \ + } while (0) + /** * To define a comment in the XML, use: * diff --git a/inspector/inspecto...
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed