mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 17:06:39 +09:00
coredumpctl: check return of strndup
This commit is contained in:
committed by
Lennart Poettering
parent
45db2956ba
commit
348a25edbb
@@ -262,7 +262,7 @@ static int retrieve(const void *data,
|
||||
return 0;
|
||||
|
||||
*var = strndup((const char*)data + ident, len - ident);
|
||||
if (!var)
|
||||
if (!*var)
|
||||
return log_oom();
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user