mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
mkhtemp: fix bad check
where the path is quite short and the number of X is quite big compared to the rest of it, this check will actually cause a false overflow error. the maths are correct, just not the error Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -842,8 +842,7 @@ mkhtemp(int *fd,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fname_len > len ||
|
||||
fname_len > (len - xc)) {
|
||||
if (fname_len > len) {
|
||||
errno = EOVERFLOW;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user