Actions
Bug #2729
closedBlock::fromStream decode error when TLV-LENGTH equals zero
Start date:
04/04/2015
Due date:
% Done:
100%
Estimated time:
0.50 h
Description
Snippet to reproduce:
uint8_t BUFFER[] = { 0x07, 0x00 };
std::stringstream stream;
stream.write(reinterpret_cast<const char*>(BUFFER), sizeof(BUFFER));
stream.seekg(0);
Block::fromStream(stream);
Expected: no error
Actual: "Not enough data in the buffer to fully parse TLV"
Updated by Junxiao Shi over 9 years ago
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
Solution: don't read from iterator if length equals zero
Updated by Junxiao Shi over 9 years ago
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
Updated by Junxiao Shi over 9 years ago
- Status changed from Code review to Closed
Updated by Junxiao Shi over 7 years ago
- Related to Bug #4180: Block::fromStream consumes extra octet when TLV-LENGTH equals zero added
Actions