[LTP] [PATCH v4] tst_tmpdir: Fix buffer overflow in tst_tmpdir.c

Andrea Cervesato andrea.cervesato@suse.com
Wed Feb 25 08:38:30 CET 2026


Hi!

> +		if (unlinkat(dir_fd, obj, flags) < 0) {
> +			if (errmsg != NULL) {
> +				snprintf(err_msg, sizeof(err_msg),
>  						"remove(%s) failed; errno=%d: %s",

There's still one more issue in here:

We are checking the error for `unlinkat`, so error message should not
mention `remove(%s)`. But this can be fixed before merge.

Otherwise LGTM

-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com



More information about the ltp mailing list