-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: G602 Slice Bound Checking (#973)
* Added slice bounds testing for slice expressions. * Added checking slice index. * Added test for reassigning slice. * Store capacities on reslicing. * Scope change clears map. Func name used to track slices. * Map CallExpr to check bounds when passing to functions. * Fixed linter errors. * Updated rulelist with CWE mapping. * Added comment for NewSliceBoundCheck. * Addressed nil cap runtime error. * Replaced usage of nil in call arg map with dummy callexprs. * Updated comments, wrapped error return, addressed other review concerns.
- Loading branch information
Showing
5 changed files
with
589 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.