02-03-2017, 09:01 AM
Rule 20.3 requires parameter checking for library functions, although memcpy is not explicitly mentioned.
The behaviour of memcpy is undefined, if the memory regions overlap.
However, in your example it is provable by static analysis that this can never be the case.
Excerpt from Rule 20.3:
The behaviour of memcpy is undefined, if the memory regions overlap.
However, in your example it is provable by static analysis that this can never be the case.
Excerpt from Rule 20.3:
Quote:Demonstrate statically that the input parameters never can take invalid valuesSo, long story short: false positive, contact tool vendor.
<t></t>