diff options
| author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2023-06-23 10:27:06 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 11:06:44 +0100 |
| commit | bb166bdae1a7d7db30e9be7e6ccaba606debc05f (patch) | |
| tree | 07547f4fdf03cfc176ba6edd0f1ac7456f3a3e0d /kernel | |
| parent | 66f9969141c0c5961e657fded8379699417106a5 (diff) | |
| download | linux-bb166bdae1a7d7db30e9be7e6ccaba606debc05f.tar.gz linux-bb166bdae1a7d7db30e9be7e6ccaba606debc05f.tar.bz2 linux-bb166bdae1a7d7db30e9be7e6ccaba606debc05f.zip | |
pstore/platform: Add check for kstrdup
[ Upstream commit a19d48f7c5d57c0f0405a7d4334d1d38fe9d3c1c ]
Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.
Fixes: 563ca40ddf40 ("pstore/platform: Switch pstore_info::name to const")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20230623022706.32125-1-jiasheng@iscas.ac.cn
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
