Re: [PATCH v1 1/3] jbd2: Avoid printing out the boundary

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

 



On Thu, Mar 23, 2023 at 10:53:46AM +0100, Jan Kara wrote:
> On Wed 22-03-23 16:12:04, Andy Shevchenko wrote:
> > Theoretically possible that "%pg" will take all room for the j_devname
> > and hence the "-%lu" will go out the boundary due to unconditional
> > sprintf() in use. To make this code more robust, replace two sequential
> > s*printf():s by a single call and then replace forbidden character.
> > It's possible to do this way, because '/' won't ever be in the result
> > of "-%lu".
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> 
> Looks good. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>

Thank you! I'll incorporate this into v2 with dropping not anymore used
variable (as found by LKP).

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux