Re: [PATCH] libnsm: fix the safer atomic filenames fix

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

 



On 27 Nov 2024, at 6:40, Steve Dickson wrote:

> On 11/26/24 6:32 PM, Benjamin Coddington wrote:
>> Commit 9f7a91b51ffc ("libnsm: safer atomic filenames") messed up the length
>> arguement to snprintf() in nsm_make_temp_pathname such that the length is
>> longer than the computed string.  When compiled with "-O
>> -D_FORTIFY_SOURCE=3", __snprintf_chk will fail and abort statd.
>>
>> The fix is to correct the original size calculation, then pull one from the
>> snprintf length for the final "/".
>>
>> Fixes: 9f7a91b51ffc ("libnsm: safer atomic filenames")
>> Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx>
> Committed...

I just sent a v2 - this version doesn't handle paths without '/'.

Ben





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux