From: Maks Mishin <[email protected]>

Signed-off-by: Maks Mishin <[email protected]>
---
 coreutils/od_bloaty.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index 5b5e56a..d5b8999 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1233,8 +1233,10 @@ int od_main(int argc UNUSED_PARAM, char **argv)
                                "'%c' (must be [doxn])", str_A[0]);
                pos = p - doxn;
                if (pos == 3) G.format_address = format_address_none;
-               address_base_char = doxn_address_base_char[pos];
-               address_pad_len_char = doxn_address_pad_len_char[pos];
+               if (pos < 3) {
+                       address_base_char = doxn_address_base_char[pos];
+                       address_pad_len_char = doxn_address_pad_len_char[pos];
+               }
        }
        if (opt & OPT_N) {
                max_bytes_to_format = xstrtooff_sfx(str_N, 0, bkm_suffixes);
-- 
2.43.0
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to