From: Cyril Hrubis <chrubis@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] tst_tmpdir: Fix buffer overflow in tst_tmpdir.c
Date: Wed, 25 Feb 2026 11:58:53 +0100 [thread overview]
Message-ID: <aZ7V7XD6LIiZ4m0e@yuki.lan> (raw)
In-Reply-To: <20260225015044.19233-1-wegao@suse.com>
Hi!
> @@ -183,8 +186,7 @@ static int purge_dir(const char *path, char **errptr)
> continue;
>
> /* Recursively remove the current entry */
> - sprintf(dirobj, "%s/%s", path, dir_ent->d_name);
> - if (rmobj(dirobj, errptr) != 0)
> + if (rmobjat(subdir_fd, dir_ent->d_name, errptr) != 0)
> ret_val = -1;
> }
Shouldn't we close(subdir_fd) here as well?
> @@ -192,63 +194,53 @@ static int purge_dir(const char *path, char **errptr)
> return ret_val;
> }
>
The rest seems to be fine.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-02-25 10:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 14:16 [LTP] [PATCH v1] tst_tmpdir: Fix buffer overflow in tst_tmpdir.c Wei Gao via ltp
2025-05-22 19:39 ` Petr Vorel
2025-05-23 6:01 ` Jan Stancek via ltp
2025-05-23 6:29 ` Petr Vorel
2025-05-23 6:29 ` Cyril Hrubis
2025-05-23 21:09 ` [LTP] [PATCH v2] " Wei Gao via ltp
2025-11-13 14:38 ` Cyril Hrubis
2025-11-14 8:58 ` Petr Vorel
2025-11-25 4:39 ` Wei Gao via ltp
2025-11-25 4:36 ` Wei Gao via ltp
2025-11-25 4:40 ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-02-17 15:01 ` Andrea Cervesato via ltp
2026-02-25 1:50 ` [LTP] [PATCH v4] " Wei Gao via ltp
2026-02-25 7:38 ` Andrea Cervesato via ltp
2026-02-25 7:38 ` Andrea Cervesato via ltp
2026-02-25 10:58 ` Cyril Hrubis [this message]
2026-02-26 1:34 ` Wei Gao via ltp
2026-02-26 8:59 ` Cyril Hrubis
2026-02-26 9:36 ` Andrea Cervesato via ltp
2026-02-26 12:26 ` Cyril Hrubis
2025-09-01 15:08 ` [LTP] [PATCH v1] " Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aZ7V7XD6LIiZ4m0e@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.