On Aug 30, 2017, at 8:31 AM, Renlin Li wrote:
> memcpy is better than strncpy in this case.
> Here is the updated patch.
Ok.
Hi Aaron,
On 30/08/17 15:37, Aaron Sawdey wrote:
On Wed, 2017-08-30 at 10:16 +0100, Renlin Li wrote:
Hi,
Hi,
Renlin you are correct that it shouldn't be using strcpy because the
string may not be null terminated. However I would suggest we use
memcpy instead of strncpy. The reason is that
On Wed, 2017-08-30 at 10:16 +0100, Renlin Li wrote:
> Hi,
>
> In test_driver_memcmp function, I found buf1 and buf2 is not properly
> terminated with null character.
>
> In lib_strncmp, strcpy will be called with buf1 and buf2.
> The normal implementation of strcpy function has a loop to copy
> c