martong (Gabor Marton)
User

Projects

User does not belong to any projects.

User Details

User Since
Tue, Oct 10, 8:01 AM (1 w, 5 d)

Recent Activity

Fri, Oct 20

martong added a comment to D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc.

We might get false positives in case of certain substring operations.
Consider the case of copying a substring, pseudo code below:

const char * s = "abcdefg";
int offset = my_find('d', s);
// I want to copy "defg"
char *new_subststring = (char*) malloc(strlen(s + offset));
strcpy(...);
Fri, Oct 20, 7:11 AM · Restricted Project
martong added a comment to D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc.

Consider the use of a function pointer:

void* malloc(int);
int strlen(char*);
auto fp = malloc;
void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); }

I think, the checker will not match in this case.

Fri, Oct 20, 6:57 AM · Restricted Project

Thu, Oct 12

martong accepted D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Thu, Oct 12, 2:18 AM

Wed, Oct 11

martong added inline comments to D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Wed, Oct 11, 5:41 AM

Tue, Oct 10

martong added inline comments to D38728: [analyzer] Use the signature of the primary template for issue hash calculation.
Tue, Oct 10, 8:42 AM