]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
efibootmgr: fix an incorrect error handling check
authormhorne <mhorne@FreeBSD.org>
Mon, 30 Nov 2020 22:16:11 +0000 (22:16 +0000)
committermhorne <mhorne@FreeBSD.org>
Mon, 30 Nov 2020 22:16:11 +0000 (22:16 +0000)
commit74bc68cd7c3688ccfd94786b742f1e20a49509d8
tree7cac93af9c42977caec2b2bafff9b230a28928b4
parent3a3231057ebd98dff69d34826e423dc7d1b9c7e9
efibootmgr: fix an incorrect error handling check

efivar_device_path_to_unix_path() returns standard error codes on
failure and zero on success. Checking for a return value less than zero
means that the actual failure cases won't be handled. This could
manifest as a segfault during the subsequent call to printf().

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D27424
usr.sbin/efibootmgr/efibootmgr.c