search for: windows_utf16_to_utf8

Displaying 11 results from an estimated 11 matches for "windows_utf16_to_utf8".

2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
...tures, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -------------- next part -------------- diff --git a/lib/hivex.c b/lib/hivex.c index 13d7556..bcee0ec 100644 --- a/lib/hivex.c +++ b/lib/hivex.c @@ -62,6 +62,7 @@ #define HIVEX_MAX_ALLOCATION 1000000 static char *windows_utf16_to_utf8 (/* const */ char *input, size_t len); +static char *windows_latin1_to_utf8 (/* const */ char *input, size_t len); static size_t utf16_string_len_in_bytes (const char *str); static size_t utf16_string_len_in_bytes_max (const char *str, size_t len); @@ -177,7 +178,8 @@ block_len (hive_h *h, size...
2009 Nov 03
1
[PATCH libguestfs] hivex: fail upon integer overflow
This is probably only theoretical, but just the same... >From 29edcca195d2998ca4a54aacec261752a3bdeb3d Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Tue, 3 Nov 2009 18:50:23 +0100 Subject: [PATCH libguestfs] hivex: fail upon integer overflow * hivex/hivex.c (windows_utf16_to_utf8): Avoid overflow and a potential infloop. --- hivex/hivex.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hivex/hivex.c b/hivex/hivex.c index b522ccf..9c28679 100644 --- a/hivex/hivex.c +++ b/hivex/hivex.c @@ -1031,9 +1031,12 @@ windows_utf16_to_utf8 (/* const */ char...
2011 Dec 13
1
[hivex] [PATCH 2/2] hivex: Expose embedded hive file name
..."\ diff --git a/lib/hivex.c b/lib/hivex.c index 455202f..11468f9 100644 --- a/lib/hivex.c +++ b/lib/hivex.c @@ -634,6 +634,12 @@ hivex_last_modified (hive_h *h) return timestamp_check (h, 0, h->last_modified); } +char * +hivex_name (hive_h *h) +{ + return (h && h->hdr) ? windows_utf16_to_utf8 (h->hdr->name, 64) : NULL; +} + int32_t hivex_major_version (hive_h *h) { diff --git a/xml/hivexml.c b/xml/hivexml.c index 3a4d9b7..059da56 100644 --- a/xml/hivexml.c +++ b/xml/hivexml.c @@ -160,6 +160,15 @@ main (int argc, char *argv[]) } } + char *hive_name = hivex_name (h); +...
2011 Feb 26
3
hivex: some issues (key encoding, ...) and suggested fixes
...UTF-16 * and inevitably find an illegal sequence (EILSEQ). Instead, stop * after we find the first \0\0. * * (Found by Hilko Bengen in a fresh Windows XP SOFTWARE hive). */ size_t slen = utf16_string_len_in_bytes_max (data, len); if (slen > len) len = slen; char *ret = windows_utf16_to_utf8 (data, len); slen is only used to increase length of data, but I think it should be decreasing it (to stop earlier). Example key where problem occurs: software\Microsoft\MediaPlayer\Preferences> lsval hivexsh: lsval: Invalid or incomplete multibyte or wide character "MyPlayLists"=sof...
2011 Aug 10
1
[PATCH] Report last-modified time of hive root and nodes
...x.c index fedbb6c..474249f 100644 --- a/lib/hivex.c +++ b/lib/hivex.c @@ -33,6 +33,7 @@ #include <sys/mman.h> #include <sys/stat.h> #include <assert.h> +#include <time.h> #include "c-ctype.h" #include "full-read.h" @@ -60,51 +61,12 @@ static char *windows_utf16_to_utf8 (/* const */ char *input, size_t len); static size_t utf16_string_len_in_bytes_max (const char *str, size_t len); -struct hive_h { - char *filename; - int fd; - size_t size; - int msglvl; - int writable; - - /* Registry file, memory mapped if read-only, or malloc'd if writing. */ - un...
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...or; + } + h->bitmap = calloc (1 + h->size / 32, 1); if (h->bitmap == NULL) goto error; @@ -328,11 +338,11 @@ hivex_open (const char *filename, int flags) h->last_modified = le64toh ((int64_t) h->hdr->last_modified); if (h->msglvl >= 2) { - char *name = windows_utf16_to_utf8 (h->hdr->name, 64); + char *name = hivex_name (h); fprintf (stderr, "hivex_open: header fields:\n" - " file version %" PRIu32 ".%" PRIu32 "\n" + " file version %" PRIi32...
2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
Some of the data in names and string values were being unsafely printed, causing some types of XML processors to fail (e.g. Python's Expat). This patch checks for printability of each character and outputs base64 with an encoding attribute for unsafe data. --- xml/hivexml.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 64 insertions(+), 11 deletions(-)
2011 Aug 13
2
[Hivex] [PATCH v3] Report last-modified time of hive root and nodes
...uint32_t nr_subkeys; /* number of subkeys */ @@ -359,6 +360,9 @@ hivex_open (const char *filename, int flags) goto error; } + /* Last-modified time. */ + h->last_modified = le64toh ((int64_t) h->hdr->last_modified); + if (h->msglvl >= 2) { char *name = windows_utf16_to_utf8 (h->hdr->name, 64); @@ -367,6 +371,8 @@ hivex_open (const char *filename, int flags) " file version %" PRIu32 ".%" PRIu32 "\n" " sequence nos %" PRIu32 " %" PRIu32 "\n"...
2011 Aug 10
1
[Hivex][PATCH v2] Report last-modified time of hive root and nodes
...h->last_modified, TIMESTAMP_BUF_LEN, le64toh ((uint64_t) h->hdr->last_modified)); + if (ft_rc) { + fprintf (stderr, "hivex: failed to parse time value\n"); + free(h->last_modified); + h->last_modified = NULL; + } + if (h->msglvl >= 2) { char *name = windows_utf16_to_utf8 (h->hdr->name, 64); @@ -367,6 +405,8 @@ hivex_open (const char *filename, int flags) " file version %" PRIu32 ".%" PRIu32 "\n" " sequence nos %" PRIu32 " %" PRIu32 "\n"...
2010 Feb 05
13
[PATCH 01/14] hivexsh: Document some peculiarities of the "cd" command.
--- hivex/hivexsh.pod | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hivex/hivexsh.pod b/hivex/hivexsh.pod index 277e3ae..9336798 100644 --- a/hivex/hivexsh.pod +++ b/hivex/hivexsh.pod @@ -100,7 +100,14 @@ or even: Path elements (node names) are matched case insensitively, and characters like space, C<*>, and C<?> have I<no> special
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.