Skip to content

Commit 20e8a92

Browse files
TylerMSFTTylerMSFT
authored andcommitted
fix github 4833
1 parent fa55e4b commit 20e8a92

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/c-runtime-library/reference/splitpath-wsplitpath.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
22
description: "Learn more about: _splitpath, _wsplitpath"
33
title: "_splitpath, _wsplitpath"
4-
ms.date: "4/2/2020"
4+
ms.date: 11/30/2023
55
api_name: ["_wsplitpath", "_splitpath", "_o__splitpath", "_o__wsplitpath"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["wsplitpath", "_splitpath", "splitpath", "_wsplitpath", "_tsplitpath"]
1010
helpviewer_keywords: ["_splitpath function", "pathnames", "wsplitpath function", "splitpath function", "_wsplitpath function", "tsplitpath function", "path names", "_tsplitpath function"]
11-
ms.assetid: 32bd76b5-1385-4ee8-a64c-abcb541cd2e4
1211
---
1312
# `_splitpath`, `_wsplitpath`
1413

15-
Break a path name into components. More secure versions of these functions are available, see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
14+
Break a path into components. For more secure versions of these functions are available, see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
1615

1716
## Syntax
1817

@@ -42,19 +41,19 @@ Full path.
4241
Drive letter, followed by a colon (**:**). You can pass `NULL` for this parameter if you don't need the drive letter.
4342

4443
*`dir`*\
45-
Directory path, including trailing slash. Forward slashes ( **/** ), backslashes ( **\\** ), or both may be used. You can pass `NULL` for this parameter if you don't need the directory path.
44+
Directory path, including trailing slash. Forward slashes ( `/` ), backslashes ( `\` ), or both may be used. Pass `NULL` for this parameter if you don't need the directory path.
4645

4746
*`fname`*\
48-
Base filename (no extension). You can pass `NULL` for this parameter if you don't need the filename.
47+
Base filename (no extension). Pass `NULL` for this parameter if you don't need the filename.
4948

5049
*`ext`*\
51-
Filename extension, including leading period (**.**). You can pass `NULL` for this parameter if you don't need the filename extension.
50+
Filename extension, including leading period (`.`). Pass `NULL` for this parameter if you don't need the filename extension.
5251

5352
## Remarks
5453

5554
The **`_splitpath`** function breaks a path into its four components. **`_splitpath`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. **`_wsplitpath`** is a wide-character version of **`_splitpath`**; the arguments to **`_wsplitpath`** are wide-character strings. These functions behave identically otherwise.
5655

57-
**Security Note** These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
56+
**Security Note** These functions are subject to buffer overrun. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see [Avoiding buffer overruns](/windows/win32/SecBP/avoiding-buffer-overruns). More secure versions of these functions are available; see [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md).
5857

5958
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6059

@@ -81,7 +80,7 @@ If the full path doesn't contain a component (for example, a filename), **`_spli
8180

8281
You can pass `NULL` to **`_splitpath`** for any parameter other than *`path`* that you don't need.
8382

84-
If *`path`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the function returns `EINVAL`.
83+
If *`path`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL`.
8584

8685
## Requirements
8786

0 commit comments

Comments
 (0)