mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
hexdump: Support octal and hex for -N option
GNU hexdump supports octal and hex, we add supports for BSD style hexdump for better compatibility. See: https://github.com/llvm/llvm-project/pull/206581/ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58074
This commit is contained in:
1 parent
7fc2c9f688
commit
b8f1972d51
1 file changed
+1
-1
@@ -139,7 +139,7 @@ oldsyntax(int argc, char ***argvp)
|
||||
errx(1, "%s: invalid skip amount", optarg);
|
||||
break;
|
||||
case 'N':
|
||||
if ((length = atoi(optarg)) <= 0)
|
||||
if ((length = strtol(optarg, NULL, 0)) <= 0)
|
||||
errx(1, "%s: invalid length", optarg);
|
||||
break;
|
||||
case 'O':
|
||||
|
||||
Reference in new issue
Block a user