Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2026 08:12:06 +0000
From:      ShengYi Hung <aokblast@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b8f1972d51cf - main - hexdump: Support octal and hex for -N option
Message-ID:  <6a5dd856.1cd9d.3992ac6@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by aokblast:

URL: https://cgit.FreeBSD.org/src/commit/?id=b8f1972d51cf93ba4393d621b126dbd408423b87

commit b8f1972d51cf93ba4393d621b126dbd408423b87
Author:     ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2026-07-07 04:49:48 +0000
Commit:     ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-07-20 08:11:54 +0000

    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
---
 usr.bin/hexdump/odsyntax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c
index 6c7ca55c3232..62d427a86e5d 100644
--- a/usr.bin/hexdump/odsyntax.c
+++ b/usr.bin/hexdump/odsyntax.c
@@ -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':


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a5dd856.1cd9d.3992ac6>