mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
util/nvmutil: rw_over_nrw: err if nrw is zero
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -2149,6 +2149,14 @@ err_is_file:
|
||||
static ssize_t
|
||||
rw_over_nrw(ssize_t r, size_t nrw)
|
||||
{
|
||||
/*
|
||||
* If a byte length of zero
|
||||
* was requested, that is
|
||||
* clearly a bug. No way.
|
||||
*/
|
||||
if (!nrw)
|
||||
goto err_rw_over_nrw;
|
||||
|
||||
if (r == -1)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user