Unit + integration coverage for the session's work: incremental project graph/index, pcode encoder, unreachable/dead-branch, equiv/cross-TU, div-by-zero/sign-conversion/int-truncation, use-after-free, quality-precision, scan-router profile, source TU runner, detector plan, and the eval fixtures.
10 lines
294 B
C
10 lines
294 B
C
// CWE-190: integer overflow (signed add of a large constant).
|
|
#include <stdlib.h>
|
|
__attribute__((noinline)) int vuln(int a) {
|
|
return a + 2147483647; // sink: signed overflow if a > 0
|
|
}
|
|
int main(int argc, char** argv) {
|
|
if (argc > 1)
|
|
return vuln(atoi(argv[1]));
|
|
return 0;
|
|
}
|