| Summary: | Patch for usr.bin/hexdump | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | simon <simon> | ||||
| Component: | bin | Assignee: | Crist J. Clark <cjc> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
simon
2001-09-20 15:27:54 UTC
hexdump(8) expects that an argument for -e option is always surrounded by
double quote (" ") marks. And following calls generate core-dumps:
$ hexdump -e "" some-file
$ hexdump -e "\"%c\"" -e " " some-file
hexdump(8) shouldn't generate core-dumps in reaction on -e "" option,
instead it should skip this format string as empty.
Following patch fixes described above problem with hexdump(8).
How-To-Repeat:
$ hexdump -e "" /COPYRIGHT
$ hexdump -e "\"%c\"" -e " " /COPYRIGHT
I checked original hexdump and patched hexdump with different format
strings in -e option, and didn't find any differences in outputs.
State Changed From-To: open->analyzed Patch looks good. Doing some checks and will commit if it works out. Responsible Changed From-To: freebsd-bugs->cjc Made the changes in my local repo and doing tests before commit. State Changed From-To: analyzed->closed This was fixed in rev 1.10 and MFCed in rev 1.4.2.1 of parse.c. Crist, I hope you do not mind me closing this :-) |