diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-15 00:02:56 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:41 +0000 |
| commit | 0ff1cac40c31a22cee485fb149bd9877452a2429 (patch) | |
| tree | 289b198a5003cbbbd5dbd899589b24ea5e9d81fa | |
| parent | 4b69645c880ed645ad27fcba3ec571be47e33401 (diff) | |
nvmutil: add missing check to io_args
accidentally removed this in a rebase
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index bea8ea2c..0003d9b2 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -2150,6 +2150,9 @@ io_args(int fd, void *mem, size_t nrw, if (((size_t)off + nrw) < (size_t)off) goto err_io_args; + if (rw_type > IO_PWRITE) + goto err_io_args; + return 0; err_io_args: |
