search for: _hivex_windows_latin1_to_utf8

Displaying 12 results from an estimated 12 matches for "_hivex_windows_latin1_to_utf8".

2013 Nov 22
0
[PATCH 3/3] Correctly handle latin1-encoded key/value names
...tf16.c */ -extern char *_hivex_windows_utf16_to_utf8 (/* const */ char *input, size_t len); +extern char* _hivex_to_utf8 (/* const */ char *input, size_t len, char* input_encoding); +#define _hivex_windows_utf16_to_utf8(_input, _len) \ + _hivex_to_utf8 (_input, _len, "UTF-16LE") +#define _hivex_windows_latin1_to_utf8(_input, _len) \ + _hivex_to_utf8 (_input, _len, "LATIN1") extern size_t _hivex_utf16_string_len_in_bytes_max (const char *str, size_t len); /* util.c */ diff --git a/lib/node.c b/lib/node.c index fda4592..fcd7442 100644 --- a/lib/node.c +++ b/lib/node.c @@ -90,12 +90,7 @@ hivex_node_...
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
..._encoding, - const char *input, size_t input_len, - const char *output_encoding, size_t *output_len); -#define _hivex_windows_utf16_to_utf8(_input, _len) \ - _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) -#define _hivex_windows_latin1_to_utf8(_input, _len) \ - _hivex_recode ("LATIN1", _input, _len, "UTF-8", NULL) -extern char* _hivex_encode_string(const char *str, size_t *size, int *utf16); +extern char * _hivex_recode (hive_h *h, recode_type r, + const char *input, size_t input_len, size...
2013 Nov 22
4
[PATCH 1/3] Document ntreg_nk_record.flags
--- lib/hivex-internal.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index f391b98..d7ce339 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -125,7 +125,19 @@ struct ntreg_hbin_block { struct ntreg_nk_record { int32_t seg_len; /* length (always -ve because used) */ char id[2];
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...const char *input, size_t input_len, > - const char *output_encoding, size_t *output_len); > -#define _hivex_windows_utf16_to_utf8(_input, _len) \ > - _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) > -#define _hivex_windows_latin1_to_utf8(_input, _len) \ > - _hivex_recode ("LATIN1", _input, _len, "UTF-8", NULL) > -extern char* _hivex_encode_string(const char *str, size_t *size, int *utf16); > +extern char * _hivex_recode (hive_h *h, recode_type r, > + const char *input, si...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
...har *input, size_t input_len, + char *output_encoding, size_t *output_len); #define _hivex_windows_utf16_to_utf8(_input, _len) \ - _hivex_to_utf8 (_input, _len, "UTF-16LE") + _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) #define _hivex_windows_latin1_to_utf8(_input, _len) \ - _hivex_to_utf8 (_input, _len, "LATIN1") + _hivex_recode ("LATIN1", _input, _len, "UTF-8", NULL) extern size_t _hivex_utf16_string_len_in_bytes_max (const char *str, size_t len); /* util.c */ diff --git a/lib/utf16.c b/lib/utf16.c index eca2343.....
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
..._encoding, - const char *input, size_t input_len, - const char *output_encoding, size_t *output_len); -#define _hivex_windows_utf16_to_utf8(_input, _len) \ - _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) -#define _hivex_windows_latin1_to_utf8(_input, _len) \ - _hivex_recode ("LATIN1", _input, _len, "UTF-8", NULL) -extern char* _hivex_encode_string(const char *str, size_t *size, int *utf16); +extern char * _hivex_recode (hive_h *h, recode_type r, + const char *input, size_t input_len, size...
2013 Dec 31
0
[PATCH 2/2] lib: utf16: Fix const-correctness issues in _hivex_recode function.
..._encoding, + const char *input, size_t input_len, + const char *output_encoding, size_t *output_len); #define _hivex_windows_utf16_to_utf8(_input, _len) \ _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) #define _hivex_windows_latin1_to_utf8(_input, _len) \ diff --git a/lib/utf16.c b/lib/utf16.c index 437613b..3641580 100644 --- a/lib/utf16.c +++ b/lib/utf16.c @@ -30,8 +30,8 @@ #include "hivex-internal.h" char * -_hivex_recode (char *input_encoding, const char *input, size_t input_len, - char *output_encodin...
2014 Jan 10
0
[PATCH 2/7] lib: Use vk->len for string conversion
...However we do need to nul-terminate the string. - */ - errno = 0; - size_t len = hivex_value_key_len (h, value); - if (len == 0 && errno != 0) - return NULL; size_t flags = le16toh (vk->flags); + size_t len = le16toh (vk->name_len); if (flags & 0x01) { return _hivex_windows_latin1_to_utf8 (vk->name, len); } else { -- 1.8.5.2
2014 Jan 13
1
[PATCH 2/7 take 2] lib: Use vk->len for string conversion
...size_t len = le16toh (vk->name_len); + + size_t seg_len = block_len (h, value, NULL); + if (sizeof (struct ntreg_vk_record) + len - 1 > seg_len) { + SET_ERRNO (EFAULT, "key length is too long (%zu, %zu)", len, seg_len); + return 0; + } if (flags & 0x01) { return _hivex_windows_latin1_to_utf8 (vk->name, len); } else { -- 1.8.5.2
2013 Dec 31
2
[PATCH 1/2] lib: write: Remove unused variable.
--- lib/write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/write.c b/lib/write.c index 8c4dd8e..384c6b2 100644 --- a/lib/write.c +++ b/lib/write.c @@ -954,7 +954,6 @@ hivex_node_set_values (hive_h *h, hive_node_h node, for (i = 0; i < nr_values; ++i) { /* Allocate vk record to store this (key, value) pair. */ static const char vk_id[2] = { 'v', 'k' }; -
2014 Jan 13
3
Re: [PATCH 2/7] lib: Use vk->len for string conversion
On Sat, Jan 11, 2014 at 12:12:47AM +0100, Hilko Bengen wrote: > --- > lib/value.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/lib/value.c b/lib/value.c > index 65404d7..e700c84 100644 > --- a/lib/value.c > +++ b/lib/value.c > @@ -207,14 +207,8 @@ hivex_value_key (hive_h *h, hive_value_h value) > struct ntreg_vk_record *vk =
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