sign: fix payload/hexdump to not assume they are the last

This commit is contained in:
Srivats P 2016-11-01 13:18:55 +05:30
parent 3ed956eebc
commit b9fd68f71d
2 changed files with 5 additions and 2 deletions

View File

@ -200,7 +200,10 @@ int HexDumpProtocol::protocolFrameSize(int streamIndex) const
if (data.pad_until_end()) if (data.pad_until_end())
{ {
int pad = mpStream->frameLen(streamIndex) int pad = mpStream->frameLen(streamIndex)
- (protocolFrameOffset(streamIndex) + len + kFcsSize); - (protocolFrameOffset(streamIndex)
+ len
+ protocolFramePayloadSize(streamIndex)
+ kFcsSize);
if (pad < 0) if (pad < 0)
pad = 0; pad = 0;
len += pad; len += pad;

View File

@ -68,7 +68,7 @@ int PayloadProtocol::protocolFrameSize(int streamIndex) const
int len; int len;
len = mpStream->frameLen(streamIndex) - protocolFrameOffset(streamIndex) len = mpStream->frameLen(streamIndex) - protocolFrameOffset(streamIndex)
- kFcsSize; - protocolFramePayloadSize(streamIndex) - kFcsSize;
if (len < 0) if (len < 0)
len = 0; len = 0;