It is gratifying to see more use of length protected string copies, but is 
important that they be done properly.

I don't see any

              strcpy(to, from);

but I do see more than one

              strncpy(to, from, strlen(from));

and

              strncpy(to, from, sizeof (from));

Both of these are equivalent to strcpy, and should be avoided.

It is critical that the third argument of strncpy be the amount of storage in 
the first argument (the destination).

I am correcting the ones I find.

John Light
Intel OTC OIC Development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150519/561b4787/attachment.html>

Reply via email to