mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
util/nvmutil: r_type check in rw_gbe_file_part
i already send the right arg anyway. this is a preventative bug fix against future maintenance. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1456,7 +1456,11 @@ rw_gbe_file_part(size_t p, int rw_type,
|
||||
|
||||
uint8_t *mem_offset;
|
||||
|
||||
if (rw_type == IO_WRITE || rw_type == IO_PWRITE)
|
||||
if (rw_type < IO_PREAD || rw_type > IO_PWRITE)
|
||||
err(errno, "%s: %s: part %lu: invalid rw_type, %d",
|
||||
fname, rw_type_str, (unsigned long)p, rw_type);
|
||||
|
||||
if (rw_type == IO_PWRITE)
|
||||
invert = 0;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user