Displaying 2 results from an estimated 2 matches for "exp_bytes".
Did you mean:
exit_bytes
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
...REG_DWORD_BIG_ENDIAN = 5
+REG_QWORD = 11
+
+def set_value (key="test key", t=REG_BINARY, value=b'Val'):
+ global h
+ h.node_set_value (h.root (), {
+ "key": key,
+ "t": t,
+ "value": value
+ })
+
+def test_pass (t, value, exp_bytes):
+ global h
+ key = "test_key"
+ set_value (key, t, value)
+ val = h.node_get_value (h.root (), key)
+ ret_type, ret_value = h.value_value (val)
+ assert t == ret_type, \
+ "expected type {0}, got {1}".format(t, ret_type)
+ assert exp_bytes == ret_va...
2014 Aug 04
6
[hivex] Segfault for an integer value to node_set_value
Hi,
When an integer argument is passed as value, node_set_value
segfaults. Reproducer is at the end of this message
The backtrace points at hivex-py.c, function get_value. While obj
is non-NULL, `bytes = PyUnicode_AsUTF8String (obj);` returns NULL.
Kind regards,
Peter
https://lekensteyn.nl
#!/usr/bin/env python3
import hivex, sys
h = hivex.Hivex(sys.argv[1])
print(h)
val = {