mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
C++: Add the example code for IntMultToLong to the test.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
int i = 2000000000;
|
||||
long j = i * i; // BAD
|
||||
long k = (long) i * i;
|
||||
@@ -12,3 +12,4 @@
|
||||
| IntMultToLong.c:108:14:108:78 | ... * ... | Multiplication result may overflow 'int' before it is converted to 'unsigned long'. |
|
||||
| IntMultToLong.c:119:14:119:26 | ... * ... | Multiplication result may overflow 'int' before it is converted to 'unsigned long'. |
|
||||
| IntMultToLong.c:126:14:126:32 | ... * ... | Multiplication result may overflow 'int' before it is converted to 'unsigned long'. |
|
||||
| IntMultToLong.cpp:2:10:2:14 | ... * ... | Multiplication result may overflow 'int' before it is converted to 'long'. |
|
||||
|
||||
Reference in New Issue
Block a user