summaryrefslogtreecommitdiff
path: root/test/data/invalid-messages/truncated-variant-sig.message-raw.hex
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-09-12 13:28:29 +0100
committerSimon McVittie <smcv@collabora.com>2022-10-05 10:41:03 +0100
commitc0bfcc097896fb57a96f55818fc5fe97db679cbf (patch)
treeb05793250670e4b374354c419021f31918329886 /test/data/invalid-messages/truncated-variant-sig.message-raw.hex
parentb9e6a7523085a2cfceaffca7ba1ab4251f12a984 (diff)
downloaddbus-c0bfcc097896fb57a96f55818fc5fe97db679cbf.tar.gz
test/data: Add messages that reproduce dbus/dbus#413, dbus/dbus#418
In debug builds with "embedded tests" enabled, these will automatically be used as input for the message-internals test. Some of the messages themselves are output from a fuzzer, others are simplifications to include only one reason for lack of validity per message. I've included an annotated hex-dump for each message here, but the dbus test suite doesn't currently know how to convert hex to binary, so I've also committed the corresponding binary. See the comment at the top of each hex-dump for how to create the binary version (which requires the xxd tool shipped with vim). It would be nice for the dbus test suite to be able to convert the annotated hex-dump to binary, either at build-time with a Python script or at runtime by loading the text file and decoding the hex, but I don't want to block on that for dbus/dbus#413 and dbus/dbus#418. Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/413 Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/418 Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d633016f7340f83142f19f4bcac08c57e1f2fd2f) [backport to 1.14.x: discard Meson build system updates]
Diffstat (limited to 'test/data/invalid-messages/truncated-variant-sig.message-raw.hex')
-rw-r--r--test/data/invalid-messages/truncated-variant-sig.message-raw.hex23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/data/invalid-messages/truncated-variant-sig.message-raw.hex b/test/data/invalid-messages/truncated-variant-sig.message-raw.hex
new file mode 100644
index 00000000..28d66b8b
--- /dev/null
+++ b/test/data/invalid-messages/truncated-variant-sig.message-raw.hex
@@ -0,0 +1,23 @@
+# Copyright 2022 Collabora Ltd.
+# SPDX-License-Identifier: MIT
+#
+# To output as binary:
+# sed -e 's/#.*//' test/data/invalid-messages/truncated-variant-sig.message-raw.hex |
+# xxd -p -r - test/data/invalid-messages/truncated-variant-sig.message-raw
+
+# Offset % 0x10:
+# 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f
+
+ 6c # little-endian
+ ff # an undefined message type
+ 00 # flags
+ 01 # major protocol version 1
+ 0000 0000 # message body is 0 bytes
+ 0100 0000 # serial number 1
+ 0400 0000 # header is an array of 4 bytes of struct (yv)
+ ff # header field code 0xff
+ ff # signature is 0xff = 255 bytes
+ 0000 # truncated (invalid!)
+ 0000 0000 # padding to 8-byte boundary
+
+#sha1 be4640e0bc1534ddf1667ced6a5e2a59c447dbdd