[Cocci] what's wrong with this SmPL?
nm127 at freemail.hu
Sat Nov 21 23:09:49 CET 2009
Julia Lawall wrote:
>> expression buffer;
>> expression field;
>> expression size;
>> expression str;
>> memset(buffer, 0, size);
>> - strncpy(
>> + strlcpy(
>> buffer->field, str, sizeof(buffer->field)
> field is not an expression, since it in itself does not have a value. It
> should be classified as an identifier. Identifier should also be used if
> you are matching a variable declaration or the header of a function
Thanks for the hint, now it is working.
Wow, what a powerful tool you made!
More information about the Cocci