search for: _len

Displaying 20 results from an estimated 24 matches for "_len".

Did you mean: s_len
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
...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") + _hivex_recode ("UTF-16LE", _input, _len, "UTF-8", NULL) #define _hivex_windows_latin1_to_utf...
2000 Aug 21
0
Rewritten script /etc/init.d/tinc
...sed -e 's/#.*//; s/[[:space:]]//g; /^$/ d' $NETSFILE)" ############################################################################## # prefix_to_mask Converts prefix length to netmask # eg. 17 -> 255.255.128.0 # $1 ... prefix function prefix_to_mask () { _MSK=""; _len="$1" for _dot in "." "." "." " "; do if [ ${_len} -ge 8 ]; then _fld=8 else _fld="${_len}" fi _MSK="${_MSK}$((255 & (255 << (8 - _fld))))${_dot}" _len=$((_len - _fld)) do...
2013 Nov 22
0
[PATCH 3/3] Correctly handle latin1-encoded key/value names
...ern 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 len); /* util.c */ diff --git a/lib/node.c b/lib/node...
2013 Dec 31
0
[PATCH 2/2] lib: utf16: Fix const-correctness issues in _hivex_recode function.
...ib/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, + const char *output_encoding, size_t *output_len); #define _hivex_wind...
2013 Dec 31
2
[PATCH 1/2] lib: write: Remove unused variable.
...2 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' }; - size_t name_len = strlen (values[i].key); size_t recoded_name_len; int use_utf16; char* recoded_name = _hivex_encode_string (values[i].key, &recoded_name_len, -- 1.8.4.2
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...t *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_windows_latin1_to_utf8(_input, _len) \ - _hivex_recode ("LATIN1...
2013 Nov 22
4
[PATCH 1/3] Document ntreg_nk_record.flags
...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]; /* "nk" */ - uint16_t flags; + uint16_t flags; /* bit 1: HiveExit + bit 2: HiveEntry == root key + bit 3: NoDelete +...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...le.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_windows_latin1_to_utf8(_input, _len) \ > - _h...
2008 Jul 08
0
[PATCH] stubdom: Fix modified_memory size calculation
...xec-dm.c Fri Jul 04 19:52:08 2008 +0100 +++ b/tools/ioemu/target-i386-dm/exec-dm.c Tue Jul 08 12:17:23 2008 +0100 @@ -573,8 +573,8 @@ #ifdef CONFIG_STUBDOM if (logdirty_bitmap != NULL) xc_hvm_modified_memory(xc_handle, domid, _addr >> TARGET_PAGE_BITS, - (_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS - - _addr >> TARGET_PAGE_BITS); + ((_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS) + - (_addr >> TARGET_PAGE_BITS)); #endif mapcache_unlock(); _______________...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...t *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_windows_latin1_to_utf8(_input, _len) \ - _hivex_recode ("LATIN1...
2003 Oct 08
4
OS/390 openssh
...ktype == KEY_UNSPEC) { @@ -93,13 +93,13 @@ goto done; } if (have_sig) { - sig = packet_get_string(&slen); + sig = packet_get_binary(&slen); packet_check_eom(); buffer_init(&b); if (datafellows & SSH_OLD_SESSIONID) { buffer_append(&b, session_id2, session_id2_len); } else { - buffer_put_string(&b, session_id2, session_id2_len); + buffer_put_binary(&b, session_id2, session_id2_len); } /* reconstruct packet */ buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); @@ -115,7 +115,7 @@ buffer_put_char(&b, have_sig); buffer_put_c...
2018 Aug 08
2
GCC 5 and -Wstrict-aliasing in JSON.h
Hello, For the IWYU project, we have a buildbot on Ubuntu 16.04 and its bundled GCC (which I think is some GCC 5 variant). We're getting a number of -Wstrict-aliasing warnings from JSON.h on this line: https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Support/JSON.h#L455 I'm not sure if GCC has a point here but GCC 7.2 does not complain, so I'm going to guess no. Would
2014 Jan 08
0
[PATCH 1/3] lib: Add internal function to calculate strlen for strings encoded in Latin1 or UTF-16LE
...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_t len, int utf16); /* util.c */ extern void _hivex...
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
2017 Aug 23
0
[PATCH v2 supermin 1/1] Switch binary embedding to a C source
...n object file equivalent to that of +# This script creates a C snippet embedding an arbitrary file # -# objcopy -I binary -B $(DEFAULT_ARCH) -O $(ELF_DEFAULT_ARCH) <in> <out> +# The output provides two variables: +# static const char _binary_$name[]; +# static const size_t _binary_$name_len; use strict; use warnings; @@ -36,28 +37,21 @@ $infile_basename =~ s{.*/}{}; print $ofh <<"EOF"; /* This file has been automatically generated from $infile by $0 */ -/* Mark stack as non-executable for GNU tools. */ -\t.section .note.GNU-stack,"",%progbits -\t.prev...
2017 Aug 23
2
[PATCH v2 supermin 0/1] Fix embedding of init
Hi, this patch replaces the first simpler version: https://www.redhat.com/archives/libguestfs/2017-August/msg00117.html The approach now is to use a C snippet, which should pose way less compatibility issues. Thanks, Pino Toscano (1): Switch binary embedding to a C source .gitignore | 2 +- src/Makefile.am | 18 +++++++++--------- src/{bin2s.pl => bin2c.pl} |
2013 Oct 28
0
Re: [Qemu-devel] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching
...emu. > > > > > > > > --- a/tools/firmware/hvmloader/ovmf.c > > > +++ b/tools/firmware/hvmloader/ovmf.c > > > @@ -79,7 +79,11 @@ static void ovmf_acpi_build_tables(void) > > > .dsdt_anycpu = dsdt_anycpu, > > > .dsdt_anycpu_len = dsdt_anycpu_len, > > > .dsdt_15cpu = NULL, > > > - .dsdt_15cpu_len = 0 > > > + .dsdt_15cpu_len = 0, > > > + .aml_ej0_name = NULL, > > > + .aml_adr_dword = NULL, > > > + .aml_ej0_name_len = 0, > &g...
2011 Apr 29
4
You don't check for malloc failure
...ves the program from SIGSEGV and replaces it with SIGABRT. -peter diff -ru icecast-2.3.2-ORIG/src/admin.c icecast-2.3.2/src/admin.c --- icecast-2.3.2-ORIG/src/admin.c Fri May 2 17:40:00 2008 +++ icecast-2.3.2/src/admin.c Thu Apr 28 19:53:03 2011 @@ -291,6 +291,9 @@ fullpath_xslt_template_len = strlen (config->adminroot_dir) + strlen (xslt_template) + 2; fullpath_xslt_template = malloc(fullpath_xslt_template_len); + if (fullpath_xslt_template == NULL) { + abort(); + } snprintf(fullpath_xslt_template, fullpath_xslt_template_len, "%s%s%s",...
2015 Jan 05
2
Re: [PATCH] virt-diff: add additional ignore options
...le) > } > > if (enable_xattrs) { > - for (i = 0; i < file->xattrs->len; ++i) { > - output_string (file->xattrs->val[i].attrname); > - output_binary (file->xattrs->val[i].attrval, > - file->xattrs->val[i].attrval_len); > + for (i = 0; i < file->xattrs_orig->len; ++i) { > + output_string (file->xattrs_orig->val[i].attrname); > + output_binary (file->xattrs_orig->val[i].attrval, > + file->xattrs_orig->val[i].attrval_len); > } >...
2014 Dec 12
0
Wine release 1.7.33
...MessageA with char buffer (Valgrind). Marcus Meissner (6): dwrite: Avoid leaking filemapping (Coverity). dwrite: Remove unused hresult assignment (Coverity). dwrite: Initialize a variable (Coverity). oleacc: Free the mapping on error (Coverity). server: Initialize the _len parts to 0 (Coverity). ntoskrnl.exe: Added IoBuildSynchronousFsdRequest and IoGetAttachedDevice stubs. Mark Harmstone (2): mmdevapi: Allow GetPropValue function in audio drivers. winealsa: Implement GetPropValue and return device path. Martin Storsjo (20): api-ms-win-core-...