diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-24 22:21:22 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-24 22:21:22 +0000 |
| commit | 4fc4946f3c257bb5228df0a8393316b1119c6712 (patch) | |
| tree | 6781547992a7ceb9c4c63211eac8cea89f82c5f5 /util/libreboot-utils/lib/file.c | |
| parent | f8d9c51a364eb941f6651d1ea7d4977cb5b83ca7 (diff) | |
util/nvmutil: fix name size in fs_resolve_at
it's capped at 256 bytes
we need it configurable and in sync with
other limits in the code.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/file.c')
| -rw-r--r-- | util/libreboot-utils/lib/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c index c9ec8f61..4a12cca7 100644 --- a/util/libreboot-utils/lib/file.c +++ b/util/libreboot-utils/lib/file.c @@ -787,7 +787,12 @@ fs_resolve_at(int dirfd, const char *path, int flags) int nextfd = -1; int curfd; const char *p; - char name[256]; +#if defined(PATH_LEN) && \ + ((PATH_LEN) >= 256) + char name[PATH_LEN]; +#else + char name[4096]; +#endif int saved_errno = errno; int r; int is_last; |
