...
Non-Compliant Code Example
| Code Block | ||
|---|---|---|
| ||
int nums[SIZE];
char *strings[SIZE];
int next_num_ptr = nums;
int free_space;
/*perform operations on next_num_ptr as array fills */
free_space = strings - next_num_ptr;
|
Compliant Solution
| Code Block | ||
|---|---|---|
| ||
nt nums[SIZE];
char *strings[SIZE];
int next_num_ptr = nums;
int free_space=SIZE;
/*perform operations on next_num_ptr as array fills
decrement free_space as it fills */
|
Risk Assessment
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
ARR36-C | 2 (medium) | 1 2 (unlikelyprobable) | 2 (medium) | P4P6 | L3 L2 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...