Re: [PATCH 2/2] module: Show the last unloaded module's taint flag(s)

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

 




Le 28/06/2022 à 09:47, Aaron Tomlin a écrit :
> On Tue 2022-06-28 05:54 +0000, Christophe Leroy wrote:
>>> -	/* Store the name of the last unloaded module for diagnostic purposes */
>>>    	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
>>> +	strcat(last_unloaded_module, module_flags(mod, buf, false));
>>
>> You replace a bounded string copy by an unbounded strict contat.
>>
>> Should you use strlcat() instead ?
> 
> Hi Christophe,
> 
> Why? If I understand correctly, both the destination and source string are
> NULL-terminated (see module_flags()). So, strcat() should be sufficient.
> 

Are you sure you will never ever end up with a string longer than the 
length of last_unloaded_module ?




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux