search for: prii32

Displaying 20 results from an estimated 20 matches for "prii32".

Did you mean: prid32
2017 Feb 15
2
[PATCH v3 0/2] hivex: handle corrupted hives better
The following patches address issues when dealing with hives that have corrupted data in them but are otherwise readable/writable. Those were found on some rather rare Windows installations that seem to work fine but current hivex fails to even open. Those patches change hivex to simply log and ignore such "corrupted" regions instead of aborting because the caller might be looking at
2017 Feb 08
0
[PATCH 2/2] lib: allow to walk registry with corrupted blocks
...ib/handle.c +++ b/lib/handle.c @@ -300,10 +300,15 @@ hivex_open (const char *filename, int flags) int used; seg_len = block_len (h, blkoff, &used); if (seg_len <= 4 || (seg_len & 3) != 0) { - SET_ERRNO (ENOTSUP, - "%s: block size %" PRIi32 " at 0x%zx, bad registry", - filename, le32toh (block->seg_len), blkoff); - goto error; + if (is_root) { + bad_root_block = 1; + } else { + DEBUG(2, + "%s: block at 0x%zx (page 0x%zx) has invalid size %"...
2011 Sep 02
1
[PATCH 6/7] hivexml: Report attributes in values instead of text.
...; return 0; @@ -344,7 +349,7 @@ value_dword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; start_value (writer, key, "int32", NULL); - XML_CHECK (xmlTextWriterWriteFormatString, (writer, "%" PRIi32, v)); + XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); end_value (writer); return 0; } @@ -355,7 +360,7 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, { xmlTextWriterPtr writer = (xmlTextWri...
2017 Feb 08
4
[PATCH 0/2] hivex: handle corrupted hives better
Hello, The following patches address issues when dealing with hives that have corrupted data in them but are otherwise readable/writable. Those were found on some rather rare Windows installations that seem to work fine but current hivex fails to even open. Those patches change hivex to simply log and ignore such "corrupted" regions instead of aborting because the caller might be
2017 Feb 14
4
[PATCH v2 0/2] hivex: handle corrupted hives better
The following patches address issues when dealing with hives that have corrupted data in them but are otherwise readable/writable. Those were found on some rather rare Windows installations that seem to work fine but current hivex fails to even open. Those patches change hivex to simply log and ignore such "corrupted" regions instead of aborting because the caller might be looking at
2017 Feb 14
2
Re: [PATCH 2/2] lib: allow to walk registry with corrupted blocks
...> @@ -300,10 +300,15 @@ hivex_open (const char *filename, int flags) > int used; > seg_len = block_len (h, blkoff, &used); > if (seg_len <= 4 || (seg_len & 3) != 0) { > - SET_ERRNO (ENOTSUP, > - "%s: block size %" PRIi32 " at 0x%zx, bad registry", > - filename, le32toh (block->seg_len), blkoff); > - goto error; > + if (is_root) { > + bad_root_block = 1; > + } else { > + DEBUG(2, As before, space before parens in function and ma...
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...o_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 ".%" PRIi32 "\n" " sequence nos %" PRIu32 " %" PRIu32 "\n" " (sequences nos should match if hive was synched at shutdown)\n" " last modified %" PRIu64 "\n...
2017 Feb 16
6
[PATCH v4 0/5] hivex: handle corrupted hives better.
The following patches address issues when dealing with hives that have corrupted data in them but are otherwise readable/writable. Those were found on some rather rare Windows installations that seem to work fine but current hivex fails to even open. Those patches change hivex to simply log and ignore such "corrupted" regions instead of aborting because the caller might be looking at
2012 Jul 31
1
[PATCH] xfs: add new api xfs-growfs
...i, "-e"); + ADD_ARG (argv, i, rtextsize_s); + } + + if (optargs_bitmask & GUESTFS_XFS_GROWFS_MAXPCT_BITMASK) { + if (maxpct < 0) { + reply_with_error ("maxpct must be >= 0"); + goto error; + } + snprintf(maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct); + ADD_ARG (argv, i, "-m"); + ADD_ARG (argv, i, maxpct_s); + } + + ADD_ARG (argv, i, buf); + ADD_ARG (argv, i, NULL); + + r = commandv (&out, &err, argv); + free (buf); + if (r == -1) { + reply_with_error ("%s: %s", path, err); + goto error; +...
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...t; PRIi64, rtextsize); ADD_ARG (argv, i, "-e"); ADD_ARG (argv, i, rtextsize_s); } @@ -438,7 +438,7 @@ do_xfs_growfs (const char *path, reply_with_error ("maxpct must be >= 0"); return -1; } - snprintf(maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct); + snprintf (maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct); ADD_ARG (argv, i, "-m"); ADD_ARG (argv, i, maxpct_s); } @@ -591,7 +591,7 @@ do_xfs_repair (const char *device, reply_with_error ("maxmem must be >= 0"); return -1;...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...OK, 0); + PARSE (uint16_t, "%" PRIu16, "0xffff", OK, 0xffff); + PARSE (uint16_t, "%" PRIu16, "0x10000", BAD); + PARSE (uint16_t, "%" PRIu16, "-1", BAD); + + /* Test nbdkit_parse_int32_t. */ + PARSE (int32_t, "%" PRIi32, "0", OK, 0); + PARSE (int32_t, "%" PRIi32, "0x7fffffff", OK, 0x7fffffff); + PARSE (int32_t, "%" PRIi32, "-0x80000000", OK, -0x80000000); + PARSE (int32_t, "%" PRIi32, "0x80000000", BAD); + PARSE (int32_t, "%...
2012 Aug 31
1
[PATCH V1] NEW API:ext:mke2fs
...MKE2FS_RESERVEDBLOCKSPERCENTAGE_BITMASK) { + if (reservedblockspercentage < 0) { + reply_with_error ("reservedblockspercentage must be >= 0"); + goto error; + } + snprintf (reservedblockspercentage_s, sizeof reservedblockspercentage_s, + "%" PRIi32, reservedblockspercentage); + ADD_ARG (argv, i, "-m"); + ADD_ARG (argv, i, reservedblockspercentage_s); + } + if (optargs_bitmask & GUESTFS_MKE2FS_LASTMOUNTEDDIR_BITMASK) { + if (lastmounteddir) { + ADD_ARG (argv, i, "-M"); + ADD_ARG (argv, i, lastmounte...
2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...e typ name + | name, FUInt32 -> + pr " fprintf (dest, \"%%s%s: %%\" PRIu32 \"%%s\", indent, %s->%s, linesep);\n" + name typ name + | name, FInt32 -> + pr " fprintf (dest, \"%%s%s: %%\" PRIi32 \"%%s\", indent, %s->%s, linesep);\n" + name typ name + | name, FChar -> + pr " fprintf (dest, \"%%s%s: %%c%%s\", indent, %s->%s, linesep);\n" + name typ name + | name, FOptPercent -> +...
2012 Mar 31
2
[PATCH v6] hivexml: Add byte run reporting functions
...hive_type t, size_t len, const char *key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; + int ret = 0; start_value (writer, key, "int32", NULL); XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -374,10 +453,12 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, hive_type t, size_t len, const char *key, int64_t v) { xmlTe...
2011 Dec 13
1
[hivex] [PATCH 1/1] hivexml: Change value type output to standard names
...*key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; - start_value (writer, key, "int32", NULL); + start_value (writer, key, value_type_windows_string (t), NULL); XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); end_value (writer); return 0; @@ -375,7 +401,7 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, hive_type t, size_t len, const char *key, int64_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; - start_value (writer, key, &q...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote: > > + int nbdkit_parse_long (const char *what, const char *str, long *r); > > + int nbdkit_parse_unsigned_long (const char *what, > > + const char *str, unsigned long *r); > > Do we really want to encourage the use of parse_long and > parse_unsigned_long? Those differ between
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...OK, 0); + PARSE (uint16_t, "%" PRIu16, "0xffff", OK, 0xffff); + PARSE (uint16_t, "%" PRIu16, "0x10000", BAD, 0); + PARSE (uint16_t, "%" PRIu16, "-1", BAD, 0); + + /* Test nbdkit_parse_int32_t. */ + PARSE (int32_t, "%" PRIi32, "0", OK, 0); + PARSE (int32_t, "%" PRIi32, "0x7fffffff", OK, 0x7fffffff); + PARSE (int32_t, "%" PRIi32, "-0x80000000", OK, -0x80000000); + PARSE (int32_t, "%" PRIi32, "0x80000000", BAD, 0); + PARSE (int32_t, &quo...
2011 Dec 08
1
[hivex] [PATCH 8/8] hivexml: Add byte run reporting functions
...hive_type t, size_t len, const char *key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; + int ret = 0; start_value (writer, key, "int32", NULL); XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -375,10 +453,12 @@ value_qword (hive_h *h, void *writer_v, hive_node_h node, hive_value_h value, hive_type t, size_t len, const char *key, int64_t v) { xmlTe...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...ode_h node, hive_value_h value, hive_type t, size_t len, const char *key, int32_t v) { xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; + int ret = 0; start_value (writer, key, "int32", NULL); - XML_CHECK (xmlTextWriterWriteFormatString, (writer, "%" PRIi32, v)); + XML_CHECK (xmlTextWriterWriteFormatAttribute, (writer, BAD_CAST "value", "%" PRIi32, v)); + ret = value_byte_runs (h, writer_v, value); end_value (writer); - return 0; + return ret; } static int @@ -354,10 +435,12 @@ value_qword (hive_h *h, void *writer_v, hiv...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...t; PRIi64 \"\\n\", indent, %s->%s);\n" - name typ name - | name, FUInt32 -> - pr " printf (\"%%s%s: %%\" PRIu32 \"\\n\", indent, %s->%s);\n" - name typ name - | name, FInt32 -> - pr " printf (\"%%s%s: %%\" PRIi32 \"\\n\", indent, %s->%s);\n" - name typ name - | name, FChar -> - pr " printf (\"%%s%s: %%c\\n\", indent, %s->%s);\n" - name typ name - | name, FOptPercent -> - pr " if (%s->%s >= 0) printf (\"%%s%s: %%g %%%%\\n\&q...