Bug 4478

Summary: Empty format unit patterns cause hexdump to segfault
Product: Busybox Reporter: Jo-Philipp Wich <jow>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: Proposed fix for the segmentation fault

Description Jo-Philipp Wich 2011-11-15 17:47:24 UTC
Created attachment 3746 [details]
Proposed fix for the segmentation fault

The following command will cause the hexdump applet to segmentation fault:

  hexdump -n1 -ve '8/2 "" "%04x" ""'

It looks like this affects all architectures, I could reproduce it on BusyBox 1.19.3 and BusyBox 1.15.3 so I assume its been there since a long time.
Comment 1 Denys Vlasenko 2011-11-18 01:48:35 UTC
Fixed in git:

commit a0bef7cc276476e69e2496e728bf97b32d3b561d
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Fri Nov 18 02:47:35 2011 +0100

    hexdump: fix hexdump -n1 -ve '8/2 ""' SEGV