Search Linux Wireless

Re: [PATCH 1/2] [v2] wifi: mwifiex: avoid strlcpy() and use strscpy() where appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/20/23 19:08, Brian Norris wrote:

I'm not sure how a compile-time constant makes this "unsafe" at all, but
if you feel the need to change this, then sure, this works too.

The only reason is to avoid strlcpy() which is now considered deprecated.

FWIW, this 'firmware' pointer is all derived from compile-time constants
too. So the commit messages seems misleading ("all other calls [...]
should be safe" --> well, *all* calls are safe).

Indeed. So I think we can stay with strcpy() everywhere except strlcpy() to strscpy() replacement
(just to follow https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy rather than
to fix something).

Dmitry




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux