-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-MediumPhase IIfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
M0-2-1
Description
The query as currently written only considers overlapping as caused by unions. We should also consider whether overlapping arrays are covered by the same rule.
Example
#include <cstring>
int16_t a[20];
void f2(void) {
std::memcpy(&a[0], &a[1], 10u * sizeof(a[0])); // Non-compliant
std::memmove(&a[0], &a[1], 10u * sizeof(a[0])); // Compliant
std::memcpy(&a[1], &a[0], 10u * sizeof(a[0])); // Non-compliant
std::memmove(&a[1], &a[0], 10u * sizeof(a[0])); // Compliant
}
Metadata
Metadata
Assignees
Labels
Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressA false positive or false negative report which is expected to take 1+ week effort to addressImpact-MediumPhase IIfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done