mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
lib/mkhtemp: fix bad string comparison
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -603,7 +603,7 @@ mkhtemp(int *fd,
|
||||
if_err_sys(slen(template, max_len, &len) < 0) ||
|
||||
if_err(len >= max_len, EMSGSIZE)
|
||||
||
|
||||
if_err_sys(slen(fname, max_len, &fname_len)) ||
|
||||
if_err_sys(slen(fname, max_len, &fname_len) < 0) ||
|
||||
if_err(fname == NULL, EINVAL) ||
|
||||
if_err(strrchr(fname, '/') != NULL, EINVAL))
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user