Skip to content
Commit 528b14c5 authored by Anna Zaks's avatar Anna Zaks
Browse files

[analyzer] MallocSizeofChecker false positive: when sizeof is argument

to addition.

We should not to warn in case the malloc size argument is an
addition containing 'sizeof' operator - it is common to use the pattern
to pack values of different sizes into a buffer. 

Ex:

uint8_t *buffer = (uint8_t*)malloc(dataSize + sizeof(length));

llvm-svn: 158219
parent bf86b295
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment