Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
monsters [2021/07/23 17:41]
christian [Incorrect stream length]
monsters [2021/07/24 07:53]
christian [Incorrect stream length]
Line 51: Line 51:
 ===== Incorrect stream length ===== ===== Incorrect stream length =====
  
-The ''/Length'' of a stream is smaller than the number of bytes.+The ''/Length'' of a stream is different from the size of the content. Ths content are the bytes between token ''stream'', followed by one ''lf'', and token ''endstream'' with optional extra whitespace before the token. 
 + 
 +The following cases are possible: 
 +  * ''/Length'' is smaller than the content. The ''endstream'' token lies ahead. 
 +  * ''/Length'' is larger than the content.  The ''endstream'' token, or parts of it, has been read as part of the stream already. 
 + 
 +The particular monster where I encountered this, had always one byte too much in the content. Therefore, not the general problem was handled, but just the simple case where the content is exactly 1 larger than the number of bytes given by the ''/Length'' attribute.
  
 === Example === === Example ===
  • monsters.txt
  • Last modified: 2021/07/24 08:12
  • by christian