misc/129078: Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used

Garrett Cooper gcooper at FreeBSD.org
Sat Nov 22 20:20:01 PST 2008


>Number:         129078
>Category:       misc
>Synopsis:       Bug in hexsyntax.c:new_syntax -- literal instead of escaped newline used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 23 04:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        8-CURRENT
>Organization:
n/a
>Environment:
FreeBSD optimus.gateway.2wire.net 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Thu Nov 20 23:31:07 PST 2008     gcooper at optimus.gateway.2wire.net:/usr/obj/usr/src/sys/OPTIMUS  amd64
>Description:
Found this minor typo bug while trying to correct the other PR's assigned to me related to hexdump.

At first glance it doesn't appear to fix anything, but I could be wrong.
>How-To-Repeat:
Unsure.
>Fix:


Patch attached with submission follows:

Index: hexsyntax.c
===================================================================
--- hexsyntax.c	(revision 185157)
+++ hexsyntax.c	(working copy)
@@ -65,7 +65,8 @@
 		add("\"%08.8_ax  \" 8/1 \"%02x \" \"  \" 8/1 \"%02x \" ");
 		add("\"  |\" 16/1 \"%_p\" \"|\\n\"");
 	}
-	while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1)
+	while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) {
+
 		switch (ch) {
 		case 'b':
 			add("\"%07.7_Ax\n\"");
@@ -124,8 +125,10 @@
 			usage();
 		}
 
+	}
+
 	if (!fshead) {
-		add("\"%07.7_Ax\n\"");
+		add("\"%07.7_Ax\\n\"");
 		add("\"%07.7_ax \" 8/2 \"%04x \" \"\\n\"");
 	}
 


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list