Skip to content

Commit 29abced

Browse files
Update docs/code-quality/c26833.md
Co-authored-by: dmitrykobets-msft <89153909+dmitrykobets-msft@users.noreply.github.com>
1 parent 8ec8ffa commit 29abced

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/code-quality/c26833.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void foo(unsigned i, unsigned j)
2929
```
3030
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.
32-
Common allocation functions like `new`, `malloc`, and `VirtalAlloc` are recognized. The check also tries to recognize custom allocator functions by case insensitive search for the `alloc` substring in the function name.
32+
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
3434
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.
3535
Usually, checking for a reasonable bound on the allocation should work.

0 commit comments

Comments
 (0)