...
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
#include <stdio.h>
typedef struct int_struct {
int x;
} int_struct;
#define MAX_INTS 10
int main(void){
size_t i;
int_struct ints[MAX_INTS];
for (i = 0; i < MAX_INTS; i++) {
ints[i] = (int_struct){i};
}
for (i = 0; i < MAX_INTS; i++) {
printf("%d\n", ints[i].x);
}
return 0;
}
|
Risk Assessment
Recommendation | Severity | Likelihood |
|---|
Detectable | Repairable | Priority | Level |
|---|---|---|---|
DCL21-C | Low | Unlikely |
No | No |
P1 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
| Axivion Bauhaus Suite |
| CertC-DCL21 | |||||||
| Helix QAC |
| C1054, C3217 |
Bibliography
| [ISO/IEC 9899:2011] | Subclause 6.5.2.5, "Compound Literals" |
...
...