Displaying 7 results from an estimated 7 matches for "recode_typ".
Did you mean:
recode_type
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...de <assert.h>
+#include <iconv.h>
+#include <pthread.h>
+
#ifdef HAVE_MMAP
#include <sys/mman.h>
#else
@@ -62,6 +65,32 @@ header_checksum (const hive_h *h)
#define HIVEX_OPEN_MSGLVL_MASK (HIVEX_OPEN_VERBOSE|HIVEX_OPEN_DEBUG)
+iconv_t *
+_hivex_get_iconv (hive_h *h, recode_type t)
+{
+ pthread_mutex_lock (&h->iconv_cache[t].mutex);
+ if (h->iconv_cache[t].handle == NULL) {
+ if (t == utf8_to_latin1)
+ h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
+ else if (t == latin1_to_utf8)
+ h->iconv_cache[t].handle...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...clude <assert.h>
+#include <iconv.h>
+#include <glthread/lock.h>
#ifdef HAVE_MMAP
#include <sys/mman.h>
@@ -62,6 +64,32 @@ header_checksum (const hive_h *h)
#define HIVEX_OPEN_MSGLVL_MASK (HIVEX_OPEN_VERBOSE|HIVEX_OPEN_DEBUG)
+iconv_t *
+_hivex_get_iconv (hive_h *h, recode_type t)
+{
+ glthread_lock_lock (&h->iconv_cache[t].mutex);
+ if (h->iconv_cache[t].handle == NULL) {
+ if (t == utf8_to_latin1)
+ h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
+ else if (t == latin1_to_utf8)
+ h->iconv_cache[t].handle...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...se gl_recursive_lock_* instead.
> #ifdef HAVE_MMAP
> #include <sys/mman.h>
> #else
> @@ -62,6 +65,32 @@ header_checksum (const hive_h *h)
>
> #define HIVEX_OPEN_MSGLVL_MASK (HIVEX_OPEN_VERBOSE|HIVEX_OPEN_DEBUG)
>
> +iconv_t *
> +_hivex_get_iconv (hive_h *h, recode_type t)
> +{
> + pthread_mutex_lock (&h->iconv_cache[t].mutex);
> + if (h->iconv_cache[t].handle == NULL) {
> + if (t == utf8_to_latin1)
> + h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
> + else if (t == latin1_to_utf8)
>...
2019 Jan 22
2
[PATCH] lib: Reset errno to zero to avoid erroneously returning E2BIG
This line was accidentally removed in 77fe74fc, causing
bug #1145056 (Bugzilla) to resurface.
---
lib/utf16.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/utf16.c b/lib/utf16.c
index e099548..67fa996 100644
--- a/lib/utf16.c
+++ b/lib/utf16.c
@@ -58,6 +58,7 @@ _hivex_recode (hive_h *h, recode_type t,
/* Reset errno here because we don't want to accidentally
* return E2BIG to a library caller.
*/
+ errno = 0;
size_t prev = outalloc;
/* Try again with a larger output buffer. */
free (out);
--
2.7.4
2019 Jan 22
0
Re: [PATCH] lib: Reset errno to zero to avoid erroneously returning E2BIG
...ausing
> bug #1145056 (Bugzilla) to resurface.
> ---
> lib/utf16.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/utf16.c b/lib/utf16.c
> index e099548..67fa996 100644
> --- a/lib/utf16.c
> +++ b/lib/utf16.c
> @@ -58,6 +58,7 @@ _hivex_recode (hive_h *h, recode_type t,
> /* Reset errno here because we don't want to accidentally
> * return E2BIG to a library caller.
> */
> + errno = 0;
> size_t prev = outalloc;
> /* Try again with a larger output buffer. */
> free (out);
Sorry about tha...
2019 Jan 22
2
Re: [PATCH] lib: Reset errno to zero to avoid erroneously returning E2BIG
...face.
> > ---
> > lib/utf16.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/utf16.c b/lib/utf16.c
> > index e099548..67fa996 100644
> > --- a/lib/utf16.c
> > +++ b/lib/utf16.c
> > @@ -58,6 +58,7 @@ _hivex_recode (hive_h *h, recode_type t,
> > /* Reset errno here because we don't want to accidentally
> > * return E2BIG to a library caller.
> > */
> > + errno = 0;
> > size_t prev = outalloc;
> > /* Try again with a larger output buffer. */
> >...
2018 Jul 23
3
[hivex PATCH] Re-allocating unused blocks before assigning new blocks
Hello Richard
As discussed in the IRC channel, when merging a moderately large reg
file (~35MB) to a hiv file (~118 MB); hivex generates a huge hiv file
(~580 MB). These changes address that by creating a list of unallocated
blocks and reassigning unused blocks. I used
https://github.com/msuhanov/regf/blob/master/Windows%20registry%20file%20format%20specification.md
as a reference for the