tballison commented on PR #2947:
URL: https://github.com/apache/tika/pull/2947#issuecomment-4959315401

   Agent has one small nit: 
   ```
   TikaUserDataBox.java:164-167 — the disk branch reads a fixed 6 bytes with no 
length guard, unlike the adjacent
     trkn branch (PLAUSIBLE, pre-existing but in the touched branch). The trkn 
case guards if (toRead == 8) before
     reading 8 bytes and skips otherwise; the disk case unconditionally reads 
getInt32()+getInt16() (6 bytes) then
     does totalRead += toRead. If any encoder writes a disk atom whose data 
length ≠ 6 (e.g. an 8-byte form mirroring
     trkn), totalRead diverges from the bytes actually consumed and the 
remaining ilst records are read misaligned.
     Real-world files are 6 bytes so this is latent, but since the PR now reads 
b from this branch it's the natural
     spot to add the same toRead ==-style guard/skip the trkn branch already 
has.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to