Re: [PATCH] cpukit/libmisc/shell: Fix string turncation warning

2020-09-04 Thread Gedare Bloom
two things: first, typo in your commit messages: "truncation" On Fri, Sep 4, 2020 at 3:34 AM Aschref Ben-Thabet wrote: > > From: Aschref Ben Thabet > > strncpy is considered unsafe as the resulting string may not be NULL > terminated. In addition it fills the unused part of the destination > buf

[PATCH] cpukit/libmisc/shell: Fix string turncation warning

2020-09-04 Thread Aschref Ben-Thabet
From: Aschref Ben Thabet strncpy is considered unsafe as the resulting string may not be NULL terminated. In addition it fills the unused part of the destination buffer unnecessarily with NULL bytes. strlcpy is designed to solve the null-termination problems – it always null-terminates. It’s cer