search for: value_data_cell_offset

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

2011 Sep 02
1
[PATCH 5/7] hivex: Add offset-&-length function for long value data
This patch adds value_data_cell_offset to the hivex ABI, to report the hive space used for long value data. Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> --- generator/generator.ml | 11 +++++++++++ lib/hivex.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 0 deletion...
2011 Oct 19
1
[hivex][PATCH 4/8] ocaml: Add unit test for new RLenValue type
...ARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *) + +(* Demonstrate value_data_cell_offset by looking at the value at + * "\$$$\PROTO.HIV\A\A", verified to be at file offset 297680 (0x48ad0) + * of the large test hive. The returned offset and length for this + * value cell should be 0,0, due to the value data being inline. + *) + + +open Unix +open Printf +let (//) = Filename....
2011 Oct 19
0
[hivex][PATCH 7/8] ruby: Add unit test for new RLenValue type
...ESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Demonstrate value_data_cell_offset by looking at the value at +# "\$$$\PROTO.HIV\A\A", verified to be at file offset 297680 (0x48ad0) +# of the large test hive. The returned offset and length for this +# value cell should be 0,0, due to the value data being inline. + +require 'test/unit' +$:.unshift(File::join(Fil...
2011 Dec 08
0
[hivex] [PATCH 7/8] ruby: Add unit test for new RLenValue type
...ESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Demonstrate value_data_cell_offset by looking at the value data at +# "\$$$PROTO.HIV\ModerateValueParent\33Bytes", verified to be at file +# offset 8680 (0x21e8) of the hive rlenvalue_test_hive. The returned +# length and offset for this value cell should be 37 bytes, position +# 8712. + +require 'test/unit' +$:.u...
2011 Dec 08
0
[hivex] [PATCH 4/8] ocaml: Add unit test for new RLenValue type
...ARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *) + +(* Demonstrate value_data_cell_offset by looking at the value data at + * "\$$$PROTO.HIV\ModerateValueParent\33Bytes", verified to be at file + * offset 8680 (0x21e8) of the hive rlenvalue_test_hive. The returned + * length and offset for this value cell should be 37 bytes, position + * 8712. + *) + +open Unix +open Printf +...
2011 Oct 19
0
[hivex][PATCH 3/8] hivex: Add offset-&-length function for long value data
This patch adds value_data_cell_offset to the hivex ABI, to report the hive space used for long (>4 bytes) value data. Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> --- generator/generator.ml | 12 +++++++++ lib/hivex.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions...
2011 Dec 08
0
[hivex] [PATCH 3/8] hivex: Add offset-&-length function for long value data
This patch adds value_data_cell_offset to the hivex ABI, to report the hive space used for long (>4 bytes) value data. Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> --- generator/generator.ml | 12 +++++++++ lib/hivex.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions...
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...+ 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_data_cell_length); + if (errno != 0) + return -1; + + XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_runs")); + memset (buf, 0, 1+BYTE_RUN_BUF_LEN); + + /* Write first byte run for data structure */ + XML_CHECK (x...
2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
...y/tests/tc_120_rlenvalue.rb index 6c03f43..6a2fb72 100644 --- a/ruby/tests/tc_120_rlenvalue.rb +++ b/ruby/tests/tc_120_rlenvalue.rb @@ -37,7 +37,7 @@ class TestRLenValue < MiniTest::Unit::TestCase moderate_value_value = h.node_get_value(moderate_value_node, "33Bytes") r = h.value_data_cell_offset(moderate_value_value) - assert_equal(r[:len], 37) - assert_equal(r[:off], 8712) + assert_equal(37, r[:len]) + assert_equal(8712, r[:off]) end end diff --git a/ruby/tests/tc_130_special.rb b/ruby/tests/tc_130_special.rb index 282b288..7570824 100644 --- a/ruby/tests/tc_130_special.rb...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...+ 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_data_cell_length); + if (errno != 0) + return -1; + + XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "byte_runs")); + memset (buf, 0, 1+BYTE_RUN_BUF_LEN); + + /* Write first byte run for data structure */ + XML_CHECK (x...
2014 Jan 10
0
[PATCH 6/7] python: Python 3 no longer recognizes long integers
...20-rlenvalue.py index ebc48f5..a9b2129 100644 --- a/python/t/120-rlenvalue.py +++ b/python/t/120-rlenvalue.py @@ -38,5 +38,5 @@ moderate_value_node = h.node_get_child (root, "ModerateValueParent") moderate_value_value = h.node_get_value (moderate_value_node, "33Bytes") r = h.value_data_cell_offset (moderate_value_value) -assert r[0] == 37L -assert r[1] == 8712L +assert r[0] == 37 +assert r[1] == 8712 -- 1.8.5.2
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...eturns 0 +and sets errno on error."; + + "value_struct_length", (RSize, [AHive; AValue "val"]), + "return the length of a value data structure", + "\ +Return the length of the value data structure. Returns 0 +and sets errno on error."; + + "value_data_cell_offset", (RLenValue, [AHive; AValue "val"]), + "return the offset and length of a value data cell", + "\ +Return the offset and length of the value's data cell, not value cell. +E.g. if the value were \"foobar\" then the length would be 6, and the +offset...
2014 Jan 10
14
[PATCH 1/7] Add a minimal hive with "special" keys and values
--- images/README | 14 ++++++++++++ images/mkzero/Makefile | 9 ++++++++ images/mkzero/mkzero.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ images/special | Bin 0 -> 8192 bytes 4 files changed, 82 insertions(+) create mode 100644 images/mkzero/Makefile create mode 100644 images/mkzero/mkzero.c create mode 100644 images/special diff --git a/images/README