Displaying 12 results from an estimated 12 matches for "input_encod".
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
...4
--- a/lib/hivex-internal.h
+++ b/lib/hivex-internal.h
@@ -268,11 +268,13 @@ extern size_t * _hivex_return_offset_list (offset_list *list);
extern void _hivex_print_offset_list (offset_list *list, FILE *fp);
/* utf16.c */
-extern char* _hivex_to_utf8 (/* const */ char *input, size_t len, char* input_encoding);
+extern char* _hivex_recode (char *input_encoding,
+ const char *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&qu...
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' };
-
2013 Dec 31
0
[PATCH 2/2] lib: utf16: Fix const-correctness issues in _hivex_recode function.
...-internal.h
index 7a548c0..6bc8638 100644
--- a/lib/hivex-internal.h
+++ b/lib/hivex-internal.h
@@ -268,9 +268,9 @@ extern size_t * _hivex_return_offset_list (offset_list *list);
extern void _hivex_print_offset_list (offset_list *list, FILE *fp);
/* utf16.c */
-extern char* _hivex_recode (char *input_encoding,
- const char *input, size_t input_len,
- char *output_encoding, size_t *output_len);
+extern char * _hivex_recode (const char *input_encoding,
+ const char *input, size_t input_len,
+ c...
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...t_list (offset_list *list);
extern void _hivex_print_offset_list (offset_list *list, FILE *fp);
+/* handle.c */
+extern iconv_t * _hivex_get_iconv (hive_h *h, recode_type r);
+extern void _hivex_release_iconv (hive_h *h, recode_type r);
+
/* utf16.c */
-extern char * _hivex_recode (const char *input_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...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...void _hivex_print_offset_list (offset_list *list, FILE *fp);
>
> +/* handle.c */
> +extern iconv_t * _hivex_get_iconv (hive_h *h, recode_type r);
> +extern void _hivex_release_iconv (hive_h *h, recode_type r);
> +
> /* utf16.c */
> -extern char * _hivex_recode (const char *input_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", N...
2013 Nov 22
0
[PATCH 3/3] Correctly handle latin1-encoded key/value names
...rn size_t * _hivex_return_offset_list (offset_list *list);
extern void _hivex_print_offset_list (offset_list *list, FILE *fp);
/* utf16.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...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...t_list (offset_list *list);
extern void _hivex_print_offset_list (offset_list *list, FILE *fp);
+/* handle.c */
+extern iconv_t * _hivex_get_iconv (hive_h *h, recode_type r);
+extern void _hivex_release_iconv (hive_h *h, recode_type r);
+
/* utf16.c */
-extern char * _hivex_recode (const char *input_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...
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];
2014 Jan 06
1
Re: [PATCH 2/2] lib: utf16: Fix const-correctness issues in _hivex_recode function.
On Tuesday 31 December 2013 14:27:11 Richard W.M. Jones wrote:
> This patch assumes that iconv doesn't actually modify the
> input buffer, even though it is declared as char *.
> ---
> [...]
> @@ -51,10 +51,11 @@ _hivex_recode (char *input_encoding, const char
> *input, size_t input_len, errno = err;
> return NULL;
> }
> - char *inp = input;
> + const char *inp = input;
> char *outp = out;
>
> - size_t r = iconv (ic, &inp, &inlen, &outp, &outlen);
> + /* Surely iconv doesn't re...
[PATCH 1/3] lib: Add internal function to calculate strlen for strings encoded in Latin1 or UTF-16LE
2014 Jan 08
0
[PATCH 1/3] lib: Add internal function to calculate strlen for strings encoded in Latin1 or UTF-16LE
...hivex-internal.h | 1 +
lib/utf16.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h
index 6bc8638..7f4cc3c 100644
--- a/lib/hivex-internal.h
+++ b/lib/hivex-internal.h
@@ -277,6 +277,7 @@ extern char * _hivex_recode (const char *input_encoding,
_hivex_recode ("LATIN1", _input, _len, "UTF-8", NULL)
extern char* _hivex_encode_string(const char *str, size_t *size, int *utf16);
extern size_t _hivex_utf16_string_len_in_bytes_max (const char *str, size_t len);
+extern size_t _hivex_utf8_strlen (const char* str, size...
2014 Nov 06
3
[PATCH 0/2] hivex: small portability fixes
Hi,
this small series cherry-picks a couple of the portability fixes
recently done in libguestfs to hivex.
There should be no actual change on Linux.
Thanks,
--
Pino
Pino Toscano (2):
normalize iconv handling
ruby: fix detection of ruby library
bootstrap | 1 +
configure.ac | 8 +++++++-
lib/utf16.c | 3 +--
3 files changed, 9 insertions(+), 3 deletions(-)
--
1.9.3
2014 Jan 08
5
hivex: Make node names and value names with embedded null characters accessible
On Windows, there exist at least two APIs for dealing with the
Registry: The Win32 API (RegCreateKeyA, RegCreateKeyW, etc.) works
with null-terminated ASCII or UTF-16 strings. The native API
(ZwCreateKey, etc.), on the other hand works with UTF-16 strings that
are stored as buffers+length and may contain null characters. Malware
authors have been relying on the Win32 API's inability to