efivars: add missing OOM check

CID #1395833
This commit is contained in:
Lennart Poettering 2018-10-12 18:50:46 +02:00
parent 165ad41b7f
commit 9db296fddd
1 changed files with 3 additions and 0 deletions

View File

@ -455,6 +455,9 @@ int efi_get_boot_option(
/* Sub-Type 4 File Path */
if (dpath->sub_type == MEDIA_FILEPATH_DP && !p && path) {
p = utf16_to_utf8(dpath->path, dpath->length-4);
if (!p)
return -ENOMEM;
efi_tilt_backslashes(p);
continue;
}