Skip to content

Commit 368d31b

Browse files
TylerMSFTTylerMSFT
authored andcommitted
acrolinx
1 parent fab75b7 commit 368d31b

File tree

6 files changed

+66
-67
lines changed

6 files changed

+66
-67
lines changed

docs/c-runtime-library/reference/get-unexpected.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ f1_keywords: ["__get_unexpected", "_get_unexpected", "get_unexpected"]
1010
helpviewer_keywords: ["__get_unexpected function", "get_unexpected function", "_get_unexpected function"]
1111
ms.assetid: a5f7a7a0-18e0-485e-953d-db291068a1e8
1212
---
13-
# _get_unexpected
13+
# `_get_unexpected`
1414

15-
Returns the termination routine to be called by **unexpected**.
15+
Returns the termination routine to be called by **`unexpected`**.
1616

1717
## Syntax
1818

@@ -22,20 +22,20 @@ unexpected_function _get_unexpected( void );
2222
2323
## Return Value
2424
25-
Returns a pointer to the function registered by [set_unexpected](set-unexpected-crt.md). If no function has been set, the return value may be used to restore the default behavior; this value may be **NULL**.
25+
Returns a pointer to the function registered by [`set_unexpected`](set-unexpected-crt.md). If no function has been set, the return value may be used to restore the default behavior; this value may be **`NULL`**.
2626
2727
## Requirements
2828
2929
|Routine|Required header|
3030
|-------------|---------------------|
31-
|**_get_unexpected**|\<eh.h>|
31+
|**`_get_unexpected`**|\<eh.h>|
3232
33-
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
33+
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
3434
3535
## See also
3636
3737
[Exception Handling Routines](../../c-runtime-library/exception-handling-routines.md)<br/>
38-
[abort](abort.md)<br/>
39-
[set_terminate](set-terminate-crt.md)<br/>
40-
[terminate](terminate-crt.md)<br/>
41-
[unexpected](unexpected-crt.md)<br/>
38+
[`abort`](abort.md)<br/>
39+
[`set_terminate`](set-terminate-crt.md)<br/>
40+
[`terminate`](terminate-crt.md)<br/>
41+
[`unexpected`](unexpected-crt.md)<br/>

docs/c-runtime-library/reference/memcpy-wmemcpy.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ f1_keywords: ["wmemcpy", "memcpy"]
1010
helpviewer_keywords: ["wmemcpy function", "memcpy function"]
1111
ms.assetid: 34abb90b-bffb-46dc-a2f3-a5e9940839d6
1212
---
13-
# memcpy, wmemcpy
13+
# `memcpy`, `wmemcpy`
1414

15-
Copies bytes between buffers. More secure versions of these functions are available; see [memcpy_s, wmemcpy_s](memcpy-s-wmemcpy-s.md).
15+
Copies bytes between buffers. More secure versions of these functions are available; see [`memcpy_s`, `wmemcpy_s`](memcpy-s-wmemcpy-s.md).
1616

1717
## Syntax
1818

@@ -31,32 +31,32 @@ wchar_t *wmemcpy(
3131

3232
### Parameters
3333

34-
*dest*<br/>
34+
*`dest`*\
3535
New buffer.
3636

37-
*src*<br/>
37+
*`src`*\
3838
Buffer to copy from.
3939

40-
*count*<br/>
40+
*`count`*\
4141
Number of characters to copy.
4242

4343
## Return Value
4444

45-
The value of *dest*.
45+
The value of *`dest`*.
4646

4747
## Remarks
4848

49-
**memcpy** copies *count* bytes from *src* to *dest*; **wmemcpy** copies *count* wide characters (two bytes). If the source and destination overlap, the behavior of **memcpy** is undefined. Use **memmove** to handle overlapping regions.
49+
**`memcpy`** copies *`count`* bytes from *`src`* to *`dest`*; **`wmemcpy`** copies *`count`* wide characters (two bytes). If the source and destination overlap, the behavior of **`memcpy`** is undefined. Use **`memmove`** to handle overlapping regions.
5050

5151
> [!IMPORTANT]
5252
> Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
5353
5454
> [!IMPORTANT]
55-
> Because so many buffer overruns, and thus potential security exploits, have been traced to improper usage of **memcpy**, this function is listed among the "banned" functions by the Security Development Lifecycle (SDL). You may observe that some VC++ library classes continue to use **memcpy**. Furthermore, you may observe that the VC++ compiler optimizer sometimes emits calls to **memcpy**. The Visual C++ product is developed in accordance with the SDL process, and thus usage of this banned function has been closely evaluated. In the case of library use of it, the calls have been carefully scrutinized to ensure that buffer overruns will not be allowed through these calls. In the case of the compiler, sometimes certain code patterns are recognized as identical to the pattern of **memcpy**, and are thus replaced with a call to the function. In such cases, the use of **memcpy** is no more unsafe than the original instructions would have been; they have simply been optimized to a call to the performance-tuned **memcpy** function. Just as the use of "safe" CRT functions doesn’t guarantee safety (they just make it harder to be unsafe), the use of "banned" functions doesn’t guarantee danger (they just require greater scrutiny to ensure safety).
55+
> Because so many buffer overruns, and thus potential security exploits, have been traced to improper usage of **`memcpy`**, this function is listed among the "banned" functions by the Security Development Lifecycle (SDL). You may observe that some VC++ library classes continue to use **`memcpy`**. Furthermore, you may observe that the VC++ compiler optimizer sometimes emits calls to **`memcpy`**. The Visual C++ product is developed in accordance with the SDL process, and thus usage of this banned function has been closely evaluated. In the case of library use of it, the calls have been carefully scrutinized to ensure that buffer overruns will not be allowed through these calls. In the case of the compiler, sometimes certain code patterns are recognized as identical to the pattern of **`memcpy`**, and are thus replaced with a call to the function. In such cases, the use of **`memcpy`** is no more unsafe than the original instructions would have been; they have simply been optimized to a call to the performance-tuned **`memcpy`** function. Just as the use of "safe" CRT functions doesn’t guarantee safety (they just make it harder to be unsafe), the use of "banned" functions doesn’t guarantee danger (they just require greater scrutiny to ensure safety).
5656
>
57-
> Because **memcpy** usage by the VC++ compiler and libraries has been so carefully scrutinized, these calls are permitted within code that is otherwise compliant with SDL. **memcpy** calls introduced in application source code are only compliant with the SDL when that use has been reviewed by security experts.
57+
> Because **`memcpy`** usage by the VC++ compiler and libraries has been so carefully scrutinized, these calls are permitted within code that is otherwise compliant with SDL. **`memcpy`** calls introduced in application source code are only compliant with the SDL when that use has been reviewed by security experts.
5858
59-
The **memcpy** and **wmemcpy** functions will only be deprecated if the constant **_CRT_SECURE_DEPRECATE_MEMORY** is defined prior to the inclusion statement in order for the functions to be deprecated, such as in the example below:
59+
The **`memcpy`** and **`wmemcpy`** functions will only be deprecated if the constant **`_CRT_SECURE_DEPRECATE_MEMORY`** is defined prior to the inclusion statement in order for the functions to be deprecated, such as in the example below:
6060

6161
```C
6262
#define _CRT_SECURE_DEPRECATE_MEMORY
@@ -74,22 +74,22 @@ or
7474

7575
|Routine|Required header|
7676
|-------------|---------------------|
77-
|**memcpy**|\<memory.h> or \<string.h>|
78-
|**wmemcpy**|\<wchar.h>|
77+
|**`memcpy`**|`<memory.h>` or `<string.h>`|
78+
|**`wmemcpy`**|`<wchar.h>`|
7979

80-
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
80+
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
8181

8282
## Example
8383

84-
See [memmove](memmove-wmemmove.md) for a sample of how to use **memcpy**.
84+
See [`memmove`](memmove-wmemmove.md) for a sample of how to use **`memcpy`**.
8585

8686
## See also
8787

88-
[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)<br/>
89-
[_memccpy](memccpy.md)<br/>
90-
[memchr, wmemchr](memchr-wmemchr.md)<br/>
91-
[memcmp, wmemcmp](memcmp-wmemcmp.md)<br/>
92-
[memmove, wmemmove](memmove-wmemmove.md)<br/>
93-
[memset, wmemset](memset-wmemset.md)<br/>
94-
[strcpy_s, wcscpy_s, _mbscpy_s](strcpy-s-wcscpy-s-mbscpy-s.md)<br/>
95-
[strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)<br/>
88+
[Buffer Manipulation](../../c-runtime-library/buffer-manipulation.md)\
89+
[`_memccpy`](memccpy.md)\
90+
[`memchr`, `wmemchr`](memchr-wmemchr.md)\
91+
[`memcmp`, `wmemcmp`](memcmp-wmemcmp.md)\
92+
[`memmove`, `wmemmove`](memmove-wmemmove.md)\
93+
[`memset`, `wmemset`](memset-wmemset.md)\
94+
[`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md)\
95+
[`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md)\

docs/c-runtime-library/reference/memmove-wmemmove.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["memmove", "wmemmove"]
1010
helpviewer_keywords: ["wmemmove function", "memmove function"]
11-
ms.assetid: 3a906114-9cf3-40d7-bd99-ee452004f218
1211
---
1312
# `memmove`, `wmemmove`
1413

@@ -31,26 +30,26 @@ wchar_t *wmemmove(
3130

3231
### Parameters
3332

34-
*dest*\
33+
*`dest`*\
3534
Destination object.
3635

37-
*src*\
36+
*`src`*\
3837
Source object.
3938

40-
*count*\
39+
*`count`*\
4140
Number of bytes (**`memmove`**) or characters (**`wmemmove`**) to copy.
4241

4342
## Return Value
4443

45-
The value of *dest*.
44+
The value of *`dest`*.
4645

4746
## Remarks
4847

49-
Copies *count* bytes (**`memmove`**) or characters (**`wmemmove`**) from *src* to *dest*. If some regions of the source area and the destination overlap, both functions ensure that the original source bytes in the overlapping region are copied before being overwritten.
48+
Copies *`count`* bytes (**`memmove`**) or characters (**`wmemmove`**) from *`src`* to *`dest`*. If some regions of the source area and the destination overlap, both functions ensure that the original source bytes in the overlapping region are copied before being overwritten.
5049

5150
**Security Note** Make sure that the destination buffer is the same size or larger than the source buffer. For more information, see [Avoiding Buffer Overruns](/windows/win32/SecBP/avoiding-buffer-overruns).
5251

53-
The **`memmove`** and **`wmemmove`** functions will only be deprecated if the constant **`_CRT_SECURE_DEPRECATE_MEMORY`** is defined prior to the inclusion statement in order for the functions to be deprecated, such as in the example below:
52+
The **`memmove`** and **`wmemmove`** functions will only be deprecated if the constant **`_CRT_SECURE_DEPRECATE_MEMORY`** is defined before the inclusion statement in order for the functions to be deprecated, such as in the example below:
5453

5554
```C
5655
#define _CRT_SECURE_DEPRECATE_MEMORY
@@ -68,10 +67,10 @@ or
6867

6968
|Routine|Required header|
7069
|-------------|---------------------|
71-
|**`memmove`**|\<string.h>|
72-
|**`wmemmove`**|\<wchar.h>|
70+
|**`memmove`**|`<string.h>`|
71+
|**`wmemmove`**|`<wchar.h>`|
7372

74-
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
73+
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
7574

7675
## Example
7776

0 commit comments

Comments
 (0)