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