diff --git a/RewindClient.c b/RewindClient.c index e230a0d..ff1ffee 100644 --- a/RewindClient.c +++ b/RewindClient.c @@ -157,7 +157,7 @@ ssize_t ReceiveRewindData(struct RewindContext* context, struct RewindData* buff struct sockaddr_in6 address; socklen_t size = sizeof(struct sockaddr_in6); - length = recvfrom(context->handle, buffer, BUFFER_SIZE, 0, (struct sockaddr*)&address, &size); + length = recvfrom(context->handle, buffer, length, 0, (struct sockaddr*)&address, &size); if (length < 0) return CLIENT_ERROR_SOCKET_IO;