ext2ed: fix potential NULL pointer dereference in dupstr()
commit29a61d8940b8a6a967a56c927d4703597f1d82e5
authorZhiqiang Liu <liuzhiqiang26@huawei.com>
Wed, 30 Jun 2021 08:27:24 +0000 (30 16:27 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Jul 2021 03:59:21 +0000 (15 23:59 -0400)
treede4b3694771bb98014bc9b0d6869e01127071bda
parenta6aee13bc2b9557c25942a197e6d7a5ec7504fe8
ext2ed: fix potential NULL pointer dereference in dupstr()

In dupstr(), we should check return value of malloc().

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Reviewed-by: Wu Bo <wubo40@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
ext2ed/main.c