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

Andrea Cervesato via ltp
2026-02-25T07:38:58Z

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