diff options
author | David Robillard <d@drobilla.net> | 2022-11-25 08:43:06 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-11-25 08:43:06 -0500 |
commit | 13e7b4726cd920caaeef0b8aa2effac78e08741a (patch) | |
tree | 34d4cc2b1b3b24651896d3c793befdba4ff411a2 | |
parent | f85870e15491cc98f8a0fa247d79073e98f1694e (diff) | |
download | zix-13e7b4726cd920caaeef0b8aa2effac78e08741a.tar.gz zix-13e7b4726cd920caaeef0b8aa2effac78e08741a.tar.bz2 zix-13e7b4726cd920caaeef0b8aa2effac78e08741a.zip |
Fix potential out of bounds read
-rw-r--r-- | src/errno_status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/errno_status.c b/src/errno_status.c index 4922b56..887158f 100644 --- a/src/errno_status.c +++ b/src/errno_status.c @@ -41,7 +41,7 @@ zix_errno_status(const int e) {0, ZIX_STATUS_ERROR}, // Fallback mapping }; - static const size_t n_mappings = sizeof(map) / sizeof(Mapping); + static const size_t n_mappings = sizeof(map) / sizeof(Mapping) - 1U; // Find the index of the matching mapping (or leave it at the fallback entry) size_t m = 0; |