diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-08 15:06:01 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-08 15:06:01 +0000 |
| commit | 1d630f8e36effef914235ca9a891e4880612a034 (patch) | |
| tree | e0d60889887db37b8b558393d3d258345a61ac2a /util/nvmutil | |
| parent | 502aeb865360db2c6f7f837a844f15529c46d0ea (diff) | |
util/nvmutil: set errno in xstrxcmp
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 1eaa6a16..cd3d3650 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1152,6 +1152,14 @@ xstrxcmp(const char *a, const char *b, size_t maxlen) /* * Should never reach here. This keeps compilers happy. */ + + /* + * If we do reach here, we want some way to crash + * nvmutil before writing anything to disk. + * + * It checks errno extremely obsessively. + */ + errno = EINVAL; return -1; } |
