Fix: reversed logic in packet vs content size
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 27 Nov 2013 08:38:23 +0000 (03:38 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Feb 2014 17:09:35 +0000 (12:09 -0500)
commit3dd513bb4187aa06c6a0e773a00efd5e44bbd82b
tree7e273d76528a7bc047d3ac95907c2f7d5626f401
parent4d251e2240975c1b35092545a547b64a881f0174
Fix: reversed logic in packet vs content size

As described in CTF section 5.2

"If the packet size field is missing, the whole stream only contains a
single packet. If the content size field is missing, the packet is
filled (no padding). The content and packet sizes include all headers."

Here is the correct semantic:

* Content size and packet size are available:

  Packet is filled with data up to content size, and then with padding
  up to packet size.

* Content size available, no packet size field:

  The stream has a single packet. It is filled up to content size, and
  the rest is padding.

* Packet size available, no content size field:

  Packet filled completely, no padding.

Fixes #683

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
This page took 0.024747 seconds and 4 git commands to generate.