lkml.org 
[lkml]   [2019]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] string: Add stracpy and stracpy_pad mechanisms
From
Date
> New version.  I check for non-use of the return value of strlcpy and
> address some issues that affected the matching of the case where the first
> argument involves a pointer dereference.

I suggest to take another look at corresponding implementation details
of the shown SmPL script.


> \(strscpy\|strlcpy\)(e1.f, e2, i2)@p

Can the data access operator “->” (arrow) matter also here?


> @@
> identifier r.i1,r.i2;
> type T;
> @@
> struct i1 { ... T i1[i2]; ... }

Will an additional SmPL rule name be helpful for this part?


> @@
> (
> -x = strlcpy
> +stracpy
> (e1.f, e2
> - , i2
> )@p;
> ... when != x
>
> |

I wonder about the deletion of the assignment target.
Should the setting of such a variable be usually preserved?

Regards,
Markus

\
 
 \ /
  Last update: 2019-07-25 09:47    [W:0.255 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site