Bug #5328

TransferableGraphFileReader may overrun ByteFileReader's internal buffer

Added by Tuukka Lehtonen about 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:2014-05-05
Priority:4Due date:2014-09-05
Assignee:Tuukka Lehtonen% Done:

100%

Category:-Spent time:2.00 hours
Target version:1.13.3RC2
Release notes:
Story points-
Velocity based estimate-
ReleaseSimantics 1.13.3Release relationshipAuto

Description

A diagram TG export revealed the following bugs in TransferableGraphFileReader.readTG:
  1. The identify reading loop can take a path which read two times in a row from the internal reading buffer without checking whether there is still data or not.
  2. Reading does not take into account that the TGs can contain strings that are longer than 127 characters and that the length of the string is actually encoded as a dynamic 32-bit integer whose physical length can vary between 1-5 bytes depending on the value.

Associated revisions

Revision 30296
Added by Tuukka Lehtonen about 3 years ago

  • Fixed modified UTF-8 string reading array buffer overrun bug from TransferableGraphFileReader
    • Added getDynamicUInt32 to ByteFileReader to faciliate the fix (copied from class org.simantics.databoard.util.binary.Endian)
  • Better debug prints for UnescapedChildMapOfResource

refs #5328

Revision 30297
Added by Tuukka Lehtonen about 3 years ago

Merged trunk@30296 to branches/simantics-1.13 on 2014-09-20 for 1.13.3 release.

refs #4860
refs #5328

History

#1 Updated by Tuukka Lehtonen about 3 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • Assignee set to Tuukka Lehtonen
  • % Done changed from 0 to 100
  • Release set to 18

#2 Updated by Tuukka Lehtonen about 3 years ago

  • Target version changed from 1.13.3 to 1.13.3RC2

#3 Updated by Tuukka Lehtonen about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF