# HG changeset patch # User Matti Hamalainen # Date 1425264447 -7200 # Node ID a3ef48c7e9d3c23d066ebcb675d05a2fb78ecbf1 # Parent 7bf42124819050184d5ca5ddd641e4dad4485df5 Check for end of input data, there might be no "final" bit set in the stream. diff -r 7bf421248190 -r a3ef48c7e9d3 src/dmzlib.c --- a/src/dmzlib.c Mon Mar 02 04:47:03 2015 +0200 +++ b/src/dmzlib.c Mon Mar 02 04:47:27 2015 +0200 @@ -556,6 +556,9 @@ ctx->codeBuffer = 0; do { + if (ctx->inBuffer == ctx->inBufferEnd) + break; + final = dmZReceive(ctx, 1); type = dmZReceive(ctx, 2); if (type == 0)