aboutsummaryrefslogtreecommitdiff
path: root/util-linux/hexdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/hexdump.c')
-rw-r--r--util-linux/hexdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 2eb5e57ae..7b89e6fdc 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -90,7 +90,7 @@ int hexdump_main(int argc, char **argv)
bb_dump_addfile(dumper, optarg);
} /* else */
if (ch == 'n') {
- dumper->dump_length = xatoi_u(optarg);
+ dumper->dump_length = xatoi_positive(optarg);
} /* else */
if (ch == 's') { /* compat: -s accepts hex numbers too */
dumper->dump_skip = xstrtoul_range_sfx(optarg, /*base:*/ 0, /*lo:*/ 0, /*hi:*/ LONG_MAX, suffixes);