Skip to content

Commit ef931bf

Browse files
Update docs/code-quality/c26833.md
Co-authored-by: dmitrykobets-msft <[email protected]>
1 parent 8a57739 commit ef931bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/code-quality/c26833.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void foo(unsigned i, unsigned j)
3131
The code example above has a check `size > 50`. Unfortunately, this check is too late. In case `i + j` overflows, it produces a small value that passes the check. So, `SmallAlloc` allocates a buffer smaller than expected. Future accesses of the buffer like `p[i]` are out of bounds. These code patterns can result in remote code execution vulnerabilities.
3232
Common allocation functions like `new`, `malloc`, and `VirtualAlloc` are recognized. The check also tries to recognize custom allocator functions by case insensitive search for the `alloc` substring in the function name.
3333
34-
Our analysis engine's numerical solver have some limitations reasoning about numerical overflows. As a result, this check is using some heuristics and sometimes fails to recognize that certain checks can prevent overflows.
34+
Our analysis engine's numerical solver have some limitations reasoning about numerical overflows. As a result, this check uses some heuristics and sometimes fails to recognize that certain checks can prevent overflows.
3535
Usually, checking for a reasonable bound on the allocation should work.
3636
3737
This warning is available in Visual Studio 2022 version 17.7 and later versions.

0 commit comments

Comments
 (0)