forked from osmocom/wireshark
rdp: fix zgfx compression
In the case of raw tokens the decompressor was bogus and was either not updating the output count, or not updating the number of consumed bits.
This commit is contained in:
parent
4221021ab6
commit
407ebfbf94
|
@ -90,6 +90,7 @@ bitstream_copyraw_advance(bitstream_t *b, guint8 *dest, guint nbytes)
|
|||
return FALSE;
|
||||
|
||||
b->offset += nbytes;
|
||||
b->remainingBits -= (nbytes * 8);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -256,6 +257,8 @@ zgfx_write_raw(zgfx_context_t *zgfx, bitstream_t *b, guint32 count)
|
|||
if (!bitstream_copyraw(b, &(zgfx->outputSegment[zgfx->outputCount]), count))
|
||||
return FALSE;
|
||||
|
||||
zgfx->outputCount += count;
|
||||
|
||||
/* then update the history buffer */
|
||||
rest = (zgfx->historyBufferSize - zgfx->historyIndex);
|
||||
tocopy = count;
|
||||
|
|
Loading…
Reference in New Issue