]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
efibootmgr: fix an incorrect error handling check
authorMitchell Horne <mhorne@FreeBSD.org>
Mon, 30 Nov 2020 22:16:11 +0000 (22:16 +0000)
committerMitchell Horne <mhorne@FreeBSD.org>
Mon, 30 Nov 2020 22:16:11 +0000 (22:16 +0000)
commit2e085395e1994a96601abeda4b03ec9455b4d2d4
tree7cac93af9c42977caec2b2bafff9b230a28928b4
parent8db8bebf1fd70e74dc8125bd2a3db1aa369eddab
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