aboutsummaryrefslogtreecommitdiffstats
path: root/api/registry.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-31 18:13:36 +0100
committerSimon Rozman <simon@rozman.si>2020-10-31 19:11:57 +0100
commit60ad907b99ceca0dbeab6123dcc0a44d8bfad29d (patch)
tree2ad0307795fc31b3e3653199f2c1e70a98a88999 /api/registry.h
parentapi: fix up console writing for debug (diff)
downloadwintun-60ad907b99ceca0dbeab6123dcc0a44d8bfad29d.tar.xz
wintun-60ad907b99ceca0dbeab6123dcc0a44d8bfad29d.zip
api: check buffer overflows in runtime
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/registry.h')
-rw-r--r--api/registry.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/api/registry.h b/api/registry.h
index 0ba7279..0a02d42 100644
--- a/api/registry.h
+++ b/api/registry.h
@@ -17,7 +17,7 @@
*
* @param Key Handle of the parent registry key. Must be opened with notify access.
*
- * @param Path Subpath of the registry key to open.
+ * @param Path Subpath of the registry key to open. Zero-terminated string of up to MAX_REG_PATH-1 characters.
*
* @param Access A mask that specifies the desired access rights to the key to be opened.
*
@@ -28,12 +28,7 @@
* @return ERROR_SUCCESS on success; WAIT_TIMEOUT on timeout; Win32 error code otherwise.
*/
WINTUN_STATUS
-RegistryOpenKeyWait(
- _In_ HKEY Key,
- _In_z_count_c_(MAX_REG_PATH) const WCHAR *Path,
- _In_ DWORD Access,
- _In_ DWORD Timeout,
- _Out_ HKEY *KeyOut);
+RegistryOpenKeyWait(_In_ HKEY Key, _In_z_ const WCHAR *Path, _In_ DWORD Access, _In_ DWORD Timeout, _Out_ HKEY *KeyOut);
/**
* Validates and/or sanitizes string value read from registry.