Bug 4478 - Empty format unit patterns cause hexdump to segfault
Summary: Empty format unit patterns cause hexdump to segfault
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.19.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 17:47 UTC by Jo-Philipp Wich
Modified: 2011-11-18 01:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Proposed fix for the segmentation fault (309 bytes, patch)
2011-11-15 17:47 UTC, Jo-Philipp Wich
Details

Note You need to log in before you can comment on or make changes to this bug.
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