-
-
Notifications
You must be signed in to change notification settings - Fork 644
Commit eaedce9
Improvement the int conversion overflow logic to handle bound checks (#1194)
* add test cases
Signed-off-by: czechbol <[email protected]>
* fix bounds check logic
Signed-off-by: czechbol <[email protected]>
* tweak test cases
Signed-off-by: czechbol <[email protected]>
* fix codestyle
Signed-off-by: czechbol <[email protected]>
* improve bounds check logic
Signed-off-by: czechbol <[email protected]>
* max recursion depth
Signed-off-by: czechbol <[email protected]>
* add test case for len function
Signed-off-by: czechbol <[email protected]>
* relax len function bounds checks
Co-authored-by: Ben Krieger <[email protected]>
* handle cases when convert instruction is after the if blocks
Signed-off-by: czechbol <[email protected]>
* improve range check discovery, add tests
Signed-off-by: czechbol <[email protected]>
* refactor for readability
Signed-off-by: czechbol <[email protected]>
* add cap function test
Signed-off-by: czechbol <[email protected]>
* calculate signed min without throwing overflow warnings
Signed-off-by: czechbol <[email protected]>
* perform bounds checks int size calculations
Signed-off-by: czechbol <[email protected]>
* basic equal operator logic
Signed-off-by: czechbol <[email protected]>
* uintptr -> unsafe.Pointer test case
Signed-off-by: czechbol <[email protected]>
* fix review comments
Signed-off-by: czechbol <[email protected]>
* Rebase and fix go module
Change-Id: I8da6495eaaf25b1739389aa98492bd7df338085b
Signed-off-by: Cosmin Cojocar <[email protected]>
* fix false positive for negated value
Signed-off-by: czechbol <[email protected]>
* fix range conditions
Signed-off-by: czechbol <[email protected]>
* Ignore the golangci/gosec G115 warning
Change-Id: I0db56cb0a5f9ab6e815e2480ec0b66d7061b23d3
Signed-off-by: Cosmin Cojocar <[email protected]>
---------
Signed-off-by: czechbol <[email protected]>
Signed-off-by: Cosmin Cojocar <[email protected]>
Co-authored-by: Ben Krieger <[email protected]>
Co-authored-by: Cosmin Cojocar <[email protected]>1 parent ea5b276 commit eaedce9Copy full SHA for eaedce9
File tree
Expand file treeCollapse file tree
5 files changed
+832
-65
lines changedFilter options
- analyzers
- testutils
Expand file treeCollapse file tree
5 files changed
+832
-65
lines changed
0 commit comments