Reset stream length to capacity in StreamPool_Take
authorArmin Novak <armin.novak@thincast.com>
Tue, 2 Oct 2018 12:22:27 +0000 (14:22 +0200)
committerArmin Novak <armin.novak@thincast.com>
Wed, 17 Oct 2018 12:54:53 +0000 (14:54 +0200)
winpr/libwinpr/utils/collections/StreamPool.c

index 51f3ddc..6e33cdf 100644 (file)
@@ -175,6 +175,7 @@ wStream* StreamPool_Take(wStreamPool* pool, size_t size)
        else
        {
                Stream_SetPosition(s, 0);
+               Stream_SetLength(s, Stream_Capacity(s));
                StreamPool_ShiftAvailable(pool, foundIndex, -1);
        }