[SLOF] [PATCH] net: use FILENAME_MAX for arrays storing file name
    Nikunj A Dadhania 
    nikunj at linux.vnet.ibm.com
       
    Wed Aug  2 20:40:03 AEST 2017
    
    
  
Segher Boessenkool <segher at kernel.crashing.org> writes:
> On Tue, Aug 01, 2017 at 02:38:57PM +0530, Nikunj A Dadhania wrote:
>> Magic numbers were used at multiple places in the network code for size for
>> maximum file name. Use FILENAME_MAX uniformly.
>> 
>> Static analysis tool was reporting issues with using strcpy and suggesting to
>> be replaced with strncpy.
>
> You're not zero-terminating any of these strings,
I assumed that strncpy will do that :(
> nor handling overflow in any way.
I dont get what do you mean here, if we limit the max size, would't it
limit overflow?
Regards
Nikunj
    
    
More information about the SLOF
mailing list