TransRead: limit the amount of bytes we read at a time
In the function which implements fake seek forward we first calculate the
amount of bytes we have to read from the file to seek forward to the requisted
position, and then read that data in one go. However, the seek may be really
far forward, and we'll end up reading really a lot of data in one go, which
leads to high memory consumption.
This patch fixes the issue by limiting the amount of data we read in one go to
1MiB.
Change-Id: Idfdde2e432c216de34b4675e47c859f5e68a2928
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>