Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106993510
D40471.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D40471.diff
View Options
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c
--- a/usr.bin/hexdump/display.c
+++ b/usr.bin/hexdump/display.c
@@ -271,7 +271,7 @@
* XXX bcmp() is not quite right in the presence
* of multibyte characters.
*/
- if (vflag != ALL &&
+ if (need == 0 && vflag != ALL &&
valid_save &&
bcmp(curp, savp, nread) == 0) {
if (vflag != DUP) {
diff --git a/usr.bin/hexdump/tests/Makefile b/usr.bin/hexdump/tests/Makefile
--- a/usr.bin/hexdump/tests/Makefile
+++ b/usr.bin/hexdump/tests/Makefile
@@ -7,6 +7,7 @@
${PACKAGE}FILES+= d_hexdump_a.in
${PACKAGE}FILES+= d_hexdump_b.in
${PACKAGE}FILES+= d_hexdump_c.in
+${PACKAGE}FILES+= d_hexdump_bug118723.in
${PACKAGE}FILES+= d_hexdump_bflag_a.out
${PACKAGE}FILES+= d_hexdump_bflag_b.out
${PACKAGE}FILES+= d_hexdump_bflag_c.out
@@ -30,6 +31,8 @@
${PACKAGE}FILES+= d_hexdump_UCflag_a.out
${PACKAGE}FILES+= d_hexdump_UCflag_b.out
${PACKAGE}FILES+= d_hexdump_UCflag_c.out
+${PACKAGE}FILES+= d_hexdump_UCflag_bug118723.out
+${PACKAGE}FILES+= d_hexdump_UCvflag_bug118723.out
${PACKAGE}FILES+= d_hexdump_xflag_a_el.out
${PACKAGE}FILES+= d_hexdump_xflag_b_el.out
${PACKAGE}FILES+= d_hexdump_xflag_c_el.out
diff --git a/usr.bin/hexdump/tests/d_hexdump_UCflag_bug118723.out b/usr.bin/hexdump/tests/d_hexdump_UCflag_bug118723.out
new file mode 100644
--- /dev/null
+++ b/usr.bin/hexdump/tests/d_hexdump_UCflag_bug118723.out
@@ -0,0 +1,4 @@
+00000000 61 62 63 64 65 66 67 0a 30 31 32 33 34 35 36 0a |abcdefg.0123456.|
+*
+00000020 61 62 63 64 65 66 67 0a |abcdefg.|
+00000028
diff --git a/usr.bin/hexdump/tests/d_hexdump_UCvflag_bug118723.out b/usr.bin/hexdump/tests/d_hexdump_UCvflag_bug118723.out
new file mode 100644
--- /dev/null
+++ b/usr.bin/hexdump/tests/d_hexdump_UCvflag_bug118723.out
@@ -0,0 +1,4 @@
+00000000 61 62 63 64 65 66 67 0a 30 31 32 33 34 35 36 0a |abcdefg.0123456.|
+00000010 61 62 63 64 65 66 67 0a 30 31 32 33 34 35 36 0a |abcdefg.0123456.|
+00000020 61 62 63 64 65 66 67 0a |abcdefg.|
+00000028
diff --git a/usr.bin/hexdump/tests/d_hexdump_bug118723.in b/usr.bin/hexdump/tests/d_hexdump_bug118723.in
new file mode 100644
--- /dev/null
+++ b/usr.bin/hexdump/tests/d_hexdump_bug118723.in
@@ -0,0 +1,5 @@
+abcdefg
+0123456
+abcdefg
+0123456
+abcdefg
diff --git a/usr.bin/hexdump/tests/hexdump_test.sh b/usr.bin/hexdump/tests/hexdump_test.sh
--- a/usr.bin/hexdump/tests/hexdump_test.sh
+++ b/usr.bin/hexdump/tests/hexdump_test.sh
@@ -75,6 +75,10 @@
hexdump -C "$(atf_get_srcdir)/d_hexdump_b.in"
atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_c.out" \
hexdump -C "$(atf_get_srcdir)/d_hexdump_c.in"
+ atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_bug118723.out" \
+ hexdump -C "$(atf_get_srcdir)/d_hexdump_bug118723.in"
+ atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCvflag_bug118723.out" \
+ hexdump -Cv "$(atf_get_srcdir)/d_hexdump_bug118723.in"
}
atf_test_case hd_name
@@ -90,6 +94,10 @@
hd "$(atf_get_srcdir)/d_hexdump_b.in"
atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_c.out" \
hd "$(atf_get_srcdir)/d_hexdump_c.in"
+ atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_bug118723.out" \
+ hd "$(atf_get_srcdir)/d_hexdump_bug118723.in"
+ atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCvflag_bug118723.out" \
+ hd -v "$(atf_get_srcdir)/d_hexdump_bug118723.in"
}
atf_test_case d_flag
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 4:39 PM (9 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15733449
Default Alt Text
D40471.diff (3 KB)
Attached To
Mode
D40471: hexdump: Partial lines cannot be repetitions of earlier lines.
Attached
Detach File
Event Timeline
Log In to Comment