Displaying 7 results from an estimated 7 matches for "hivex_value_struct_length".
2011 Sep 02
1
[PATCH 4/7] hivex: Add metadata length functions for nodes and values
This patch adds hivex_node_struct_length and hivex_value_struct_length
to the hivex ABI, to report the amount of hive space used for each
stored structure.
Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu>
---
generator/generator.ml | 12 ++++++++++++
lib/hivex.c | 33 +++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 del...
2016 Feb 15
1
New API: node_nr_values
...;nk")) {
+ SET_ERRNO (EINVAL, "invalid block or not an 'nk' block");
+ return 0;
+ }
+
+ struct ntreg_nk_record *nk =
+ (struct ntreg_nk_record *) ((char *) h->addr + node);
+
+ size_t nr_values = le32toh (nk->nr_values);
+
+ return nr_values;
+}
+
+size_t
hivex_value_struct_length (hive_h *h, hive_value_h value)
{
size_t key_len;
Regards,
- Kevin Haroldsen (kupiakos)
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...end_value (xmlTextWriterPtr writer)
}
static int
+value_byte_runs (hive_h *h, void *writer_v, hive_value_h value) {
+ xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ char buf[1+BYTE_RUN_BUF_LEN];
+ size_t value_data_cell_length;
+ errno = 0;
+ size_t value_data_structure_length = hivex_value_struct_length (h, value);
+ if (errno != 0) {
+ if (errno == EINVAL) {
+ fprintf (stderr, "value_byte_runs: Invoked on what does not seem to be a value (%zu).\n", value);
+ }
+ return -1;
+ }
+ hive_value_h value_data_cell_offset = hivex_value_data_cell_offset (h, value, &value_dat...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...end_value (xmlTextWriterPtr writer)
}
static int
+value_byte_runs (hive_h *h, void *writer_v, hive_value_h value) {
+ xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v;
+ char buf[1+BYTE_RUN_BUF_LEN];
+ size_t value_data_cell_length;
+ errno = 0;
+ size_t value_data_structure_length = hivex_value_struct_length (h, value);
+ if (errno != 0) {
+ if (errno == EINVAL) {
+ fprintf (stderr, "value_byte_runs: Invoked on what does not seem to be a value (%zu).\n", value);
+ }
+ return -1;
+ }
+ hive_value_h value_data_cell_offset = hivex_value_data_cell_offset (h, value, &value_dat...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...n);
+ errno = EFAULT;
+ return 0;
+ }
+ return ret;
+}
+
char *
hivex_node_name (hive_h *h, hive_node_h node)
{
@@ -1189,8 +1213,17 @@ hivex_node_get_value (hive_h *h, hive_node_h node, const char *key)
return ret;
}
-char *
-hivex_value_key (hive_h *h, hive_value_h value)
+size_t
+hivex_value_struct_length (hive_h *h, hive_value_h value) {
+ size_t key_len = hivex_value_key_len (h, value);
+ if (errno)
+ return 0;
+ /* -1 to avoid double-counting the first name character */
+ return key_len + sizeof (struct ntreg_vk_record) - 1;
+}
+
+size_t
+hivex_value_key_len (hive_h *h, hive_value_h value)...
2014 Aug 07
4
[PATCH 0/2] Fix errors found by Clang static analyzer
Hi,
Here is one trivial initialization fix and another patch to convert a huge macro
to an inline function. The result of the expansion would show up in an assertion
which triggered a -Woverlength-strings warning.
Peter Wu (2):
Fix garbage return value on error
Fix overly long assertion string
lib/hivex-internal.h | 28 ++++++++++++++++------------
lib/node.c | 18
2013 Jul 25
19
[PATCH hivex 00/19] Fix read/write handling of li-records.
This is, hopefully, a full fix for handling of li-records.
See:
https://bugzilla.redhat.com/show_bug.cgi?id=717583
https://bugzilla.redhat.com/show_bug.cgi?id=987463
Rich.