Skip to content

Commit 09cd5af

Browse files
Updated C6276
Small to changes at the behest of Acrolinx
1 parent b408671 commit 09cd5af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/c6276.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Example output:
1515
1616
## Description
1717

18-
This warning indicates a potentially incorrect cast from an ANSI string (`char_t*`) to a UNICODE string (`wchar_t *`). Because UNICODE strings have a character size of 2 bytes, this cast might yield strings that are not correctly terminated. Using such strings with the wcs* library of functions could cause buffer overruns and access violations.
18+
This warning indicates a potentially incorrect cast from an ANSI string (`char_t*`) to a UNICODE string (`wchar_t *`). Because UNICODE strings have a character size of 2 bytes, this cast might yield strings that aren't correctly terminated. Using such strings with the `wcs*` library of functions could cause buffer overruns and access violations.
1919

2020
## Example
2121

@@ -46,7 +46,7 @@ VOID f()
4646
}
4747
```
4848

49-
For an additional layer of security, the following code uses the safe string manipulation function `wcscpy_s` to correct this warning. This limits the copy to 8 bytes, the size of the buffer being copied to:
49+
For an extra layer of security, the following code uses the safe string manipulation function `wcscpy_s` to correct this warning. This change limits the copy to 8 bytes, the size of the buffer being copied to:
5050

5151
```cpp
5252
#include <windows.h>

0 commit comments

Comments
 (0)