<div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div>I am writing Elixir client for D-Bus (<a href="https://github.com/mspanc/dbux">https://github.com/mspanc/dbux</a>). <br><br>I am capturing real messages generated by DBus implementation from GLib/GIO to have point of origin, and I have encountered unspecified behaviour.<br><br></div>The message sometimes contains a bunch of null bytes after the body, please take a look at the dump of the packet containing a method call to RequestName, it ends with 7 extra null bytes.<br></div><br></div>The specification says "The message body need not end on an 8-byte boundary." but "need not" does not equal "must not".<br></div><br></div>Can I safely assume that then such null bytes are allowed and drop them?<br><div><div><div><div><div><br><br><font size="1"><span style="font-family:monospace,monospace">0000   6c 01 00 01 1c 00 00 00 02 00 00 00 7d 00 00 00  l...........}...<br>0010   08 01 67 00 02 73 75 00 01 01 6f 00 15 00 00 00  ..g..su...o.....<br>0020   2f 6f 72 67 2f 66 72 65 65 64 65 73 6b 74 6f 70  /org/freedesktop<br>0030   2f 44 42 75 73 00 00 00 03 01 73 00 0b 00 00 00  /DBus.....s.....<br>0040   52 65 71 75 65 73 74 4e 61 6d 65 00 00 00 00 00  RequestName.....<br>0050   02 01 73 00 14 00 00 00 6f 72 67 2e 66 72 65 65  ..s.....org.free<br>0060   64 65 73 6b 74 6f 70 2e 44 42 75 73 00 00 00 00  desktop.DBus....<br>0070   06 01 73 00 14 00 00 00 6f 72 67 2e 66 72 65 65  ..s.....org.free<br>0080   64 65 73 6b 74 6f 70 2e 44 42 75 73 00 00 00 00  desktop.DBus....<br>0090   10 00 00 00 63 6f 6d 2e 65 78 61 6d 70 6c 65 2e  ....com.example.<br>00a0   64 62 75 78 00 00 00 00 00 00 00 00              dbux........</span></font><br><br></div><div>Thanks,<br><br></div><div>Marcin<br></div></div></div></div></div></div>