Commit Graph

221 Commits

Author SHA1 Message Date
Hugh McMaster b8b7979f9c regedit: Stop parsing REG_SZ values containing NUL character sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 12:49:39 +01:00
Alexandre Julliard 9b63daca51 include: Default to the standards-compliant version of swprintf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Alexandre Julliard 0b18409cfc regedit: Use C runtime wchar functions instead of wine/unicode.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 11:48:30 +02:00
Michael Stefaniuc 73a997c6ba regedit: Remove redundant NULL check before heap_free().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 21:40:00 +01:00
Hugh McMaster 2686166cc1 regedit: Remove array already present in main.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:44 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Hugh McMaster a926e05446 regedit: Do not directly include stdio.h any longer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 16:28:07 +02:00
Hugh McMaster 73220a3d6f regedit: Remove regproc.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 16:26:01 +02:00
Hugh McMaster ff1f664d08 regedit: Move regproc.c functions from regproc.h to main.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-21 16:22:58 +02:00
Hugh McMaster 62027322b0 regedit: Stop exporting REG_SZ data at the first NUL character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 10:41:35 +02:00
Hugh McMaster 829c0ced69 regedit: Null terminate hex-formatted REG_SZ data if necessary.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Michael Stefaniuc 505a9e0283 regedit: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 10:06:12 +01:00
Hugh McMaster 8a8a2c9bb9 regedit: Correctly export REG_DWORD values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-10 13:46:31 +01:00
Hugh McMaster aabdc271f8 regedit: Correctly export hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-10 13:46:25 +01:00
Hugh McMaster 84dda23536 regedit: Correctly import hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-16 15:26:33 +02:00
Fabian Maurer 8e9a469e9c regedit: Don't crash if REG_SZ is empty.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-02 10:14:13 +02:00
Hugh McMaster e9daef47e1 regedit: Null-terminate incomplete REG_EXPAND_SZ and REG_MULTI_SZ Unicode data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 14:57:10 +02:00
Hugh McMaster 60e771e686 regedit: Close any open registry keys before starting the key deletion process.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:07:57 +02:00
Hugh McMaster 3f0ebaeebb regedit: Return a valid pointer in the QUOTED_VALUE_NAME state if REGPROC_unescape_string() returns FALSE.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:24:49 +09:00
Hugh McMaster 6238cd46f2 regedit: Use the heap_*() functions in edit.c where possible.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Hugh McMaster c193bffb3e regedit: Use the heap_*() functions in childwnd.c where possible.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Hugh McMaster 1b3afb27c7 regedit: Use heap_xrealloc() for consistency.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Hugh McMaster f7bdf34029 regedit: Use a helper function to free allocated memory.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Hugh McMaster 79ff4148c2 regedit: Use a helper function to allocate memory and check for a valid pointer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Hugh McMaster 976c2aa649 regedit: Prevent out-of-bounds reads when unescaping a string (Valgrind).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:14:00 +02:00
Hugh McMaster 5bd636dc16 regedit: Check for a valid subkey pointer before attempting to delete a registry key (Coverity).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:31 +02:00
Hugh McMaster b501b2388d regedit: Free the value name buffer from the default value name parser state if necessary (Valgrind).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:31 +02:00
Hugh McMaster d62fb29866 regedit: Re-size the data export buffer using the required size instead of doubling it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 16:27:05 +02:00
Hugh McMaster 9d23db6b12 regedit: Remove unused header includes from regproc.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 16:27:04 +02:00
Hugh McMaster cc1d2525c4 regedit: Remove an unused #define.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 16:27:04 +02:00
Hugh McMaster 6effc48365 regedit: Export value names from the export_data() function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Hugh McMaster 97383a14f7 regedit: Append a newline to the end of the export file.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Hugh McMaster 37b5607ff6 regedit: Export REG_SZ data via the export_data() function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Hugh McMaster 6515837ada regedit: Use a helper function to export hex data and REG_DWORD data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Hugh McMaster bb147fbaa7 regedit: Export REG_DWORD data from a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 18:52:08 +02:00
Hugh McMaster 40ce665836 regedit: Export value names from a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 18:51:57 +02:00
Hugh McMaster c189effeb3 regedit: Read registry value information before exporting.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 10:50:04 +02:00
Hugh McMaster efe3bc87e7 regedit: Re-implement some parts of the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 10:47:36 +02:00
Hugh McMaster 66dcf0a87d regedit: Update some resource strings associated with key parsing.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:54 +02:00
Hugh McMaster ae147a5bf6 regedit: Output an error message and exit with error code zero instead of calling exit(1).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:53 +02:00
Hugh McMaster 7f11a24fee regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ hex data during concatenation if we reach EOF.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:11 +02:00
Michael Stefaniuc a9987fa11a regedit: Remove a redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster e2ae9e3c58 regedit: Use a function to free the parser data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster 3908296237 regedit: Null-terminate REG_EXPAND_SZ and REG_MULTI_SZ data if the parsed hex data does not end in a null-terminating character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 7b95ddcb04 regedit: Hex data lines may be terminated by a semicolon.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster b811b16694 regedit: Do not import the line if a hex data type has a "0x" prefix.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:37 +02:00
Hugh McMaster 1a4c3e5d28 regedit: Check if any hex data exists before attempting to parse it.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:18 +02:00
Hugh McMaster 5cc1b227b7 regedit: Do not remove lines beginning with a semicolon from the read buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-05 18:21:10 +02:00
Hugh McMaster 5d8a1283f2 regedit: Do not remove lines beginning with '#' from the read buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:57 +02:00
Hugh McMaster e336c86359 regedit: Skip blank and whitespace-only lines during hex data concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:49:49 +02:00