Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(986)

Unified Diff: chrome_elf/nt_registry/nt_registry.h

Issue 2885243002: [NtRegistry] Ensure REG_SZ and REG_MULTI_SZ are null terminated. (Closed)
Patch Set: Code review fixes, part 1. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome_elf/nt_registry/nt_registry.cc » ('j') | chrome_elf/nt_registry/nt_registry.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_elf/nt_registry/nt_registry.h
diff --git a/chrome_elf/nt_registry/nt_registry.h b/chrome_elf/nt_registry/nt_registry.h
index 5115410bcd24359e7186b2d67f3635c663ff372f..ba2a21b4a5ff53fd18a9c77bebebe08b4815257d 100644
--- a/chrome_elf/nt_registry/nt_registry.h
+++ b/chrome_elf/nt_registry/nt_registry.h
@@ -92,12 +92,10 @@ void CloseRegKey(HANDLE key);
// Main function to query a registry value.
// - Key handle should have been opened with CreateRegKey or OpenRegKey.
// - Types defined in winnt.h. E.g.: REG_DWORD, REG_SZ.
-// - Caller is responsible for calling "delete[] *out_buffer" (on success).
bool QueryRegKeyValue(HANDLE key,
const wchar_t* value_name,
ULONG* out_type,
- BYTE** out_buffer,
- DWORD* out_size);
+ std::vector<BYTE>* out_buffer);
// Query DWORD value.
// - WRAPPER: Function works with DWORD data type.
@@ -118,7 +116,7 @@ bool QueryRegValueDWORD(ROOT_KEY root,
DWORD* out_dword);
// Query SZ (string) value.
-// - WRAPPER: Function works with SZ data type.
+// - WRAPPER: Function works with SZ or EXPAND_SZ data type.
// - Key handle should have been opened with CreateRegKey or OpenRegKey.
// - Handle will be left open. Caller must still call CloseRegKey when done.
bool QueryRegValueSZ(HANDLE key,
@@ -127,7 +125,7 @@ bool QueryRegValueSZ(HANDLE key,
// Query SZ (string) value.
// - WRAPPER: Function opens and closes the target key for caller, and works
-// with SZ data type.
+// with SZ or EXPAND_SZ data type.
// - Use |wow64_override| to force redirection behaviour, or pass nt::NONE.
bool QueryRegValueSZ(ROOT_KEY root,
WOW64_OVERRIDE wow64_override,
« no previous file with comments | « no previous file | chrome_elf/nt_registry/nt_registry.cc » ('j') | chrome_elf/nt_registry/nt_registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698