[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1bjp9rqh5.fsf@ca-mkp.ca.oracle.com>
Date: Thu, 24 Jul 2025 21:51:55 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Pranav Tyagi <pranav.tyagi03@...il.com>
Cc: martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
target-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] target/core: replace strncpy with strscpy
Pranav,
> strncpy() is deprecated and its use is discouraged. Replace strncpy()
> with safer strscpy() as the p_buf buffer should be NUL-terminated,
> since it holds human readable debug output strings.
If you must do this, please change all the similar occurrences of
strncpy() in that file instead of just one of them.
However, given the fixed size of the buffer and the length of all the
defined static strings, what is the actual problem you are fixing?
--
Martin K. Petersen
Powered by blists - more mailing lists