linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: wuguanghao <wuguanghao3@huawei.com>
Cc: linux-ext4@vger.kernel.org, artem.blagodarenko@gmail.com,
	liuzhiqiang26@huawei.com, linfeilong@huawei.com
Subject: Re: [PATCH v2 06/12] append_pathname: check the value returned by realloc
Date: Thu, 15 Jul 2021 23:39:05 -0400	[thread overview]
Message-ID: <YPD/WV32JvoK8bZT@mit.edu> (raw)
In-Reply-To: <20210630082724.50838-7-wuguanghao3@huawei.com>

On Wed, Jun 30, 2021 at 04:27:18PM +0800, wuguanghao wrote:
> In append_pathname(), we need to add a new path to save the value returned by realloc,
> otherwise the name->path may be NULL, causing segfault
> 
> Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>

Thanks, applied, with a minor whitespace fixup, and the commit
description linewrapped.

					- Ted

  reply	other threads:[~2021-07-16  3:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30  8:27 [PATCH v2 01/12] profile_create_node: set magic before strdup(name) to avoid memory leak wuguanghao
2021-06-30  8:27 ` [PATCH v2 02/12] tdb_transaction_recover: fix " wuguanghao
2021-07-16  3:19   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 03/12] zap_sector: " wuguanghao
2021-07-16  3:20   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 04/12] ss_add_info_dir: fix memory leak and check whether wuguanghao
2021-07-16  3:27   ` Theodore Y. Ts'o
2021-07-17  3:10     ` Zhiqiang Liu
2021-06-30  8:27 ` [PATCH v2 05/12] ss_create_invocation: fix memory leak and check whether NULL pointer wuguanghao
2021-07-16  3:34   ` Theodore Y. Ts'o
2021-07-19 11:08     ` Zhiqiang Liu
2021-06-30  8:27 ` [PATCH v2 06/12] append_pathname: check the value returned by realloc wuguanghao
2021-07-16  3:39   ` Theodore Y. Ts'o [this message]
2021-06-30  8:27 ` [PATCH v2 07/12] argv_parse: check return value of malloc in argv_parse() wuguanghao
2021-07-16  3:41   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 08/12] misc: fix potential segmentation fault problem in scandir() wuguanghao
2021-07-16  3:44   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 09/12] lib/ss/error.c: check return value malloc in ss_name() wuguanghao
2021-07-16  3:46   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 10/12] hashmap: change return value type of ext2fs_hashmap_add() wuguanghao
2021-07-16  3:55   ` Theodore Y. Ts'o
2021-06-30  8:27 ` [PATCH v2 11/12] misc/lsattr: check whether path is NULL in lsattr_dir_proc() wuguanghao
2021-07-16  3:58   ` Theodore Y. Ts'o
2021-07-17  1:39     ` Zhiqiang Liu
2021-06-30  8:27 ` [PATCH v2 12/12] ext2ed: fix potential NULL pointer dereference in dupstr() wuguanghao
2021-07-16  3:59   ` Theodore Y. Ts'o
2021-07-16  3:18 ` [PATCH v2 01/12] profile_create_node: set magic before strdup(name) to avoid memory leak Theodore Y. Ts'o

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=YPD/WV32JvoK8bZT@mit.edu \
    --to=tytso@mit.edu \
    --cc=artem.blagodarenko@gmail.com \
    --cc=linfeilong@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=wuguanghao3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).