You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it currently stands, the code only supports files up to 2GB in size, as it relies on read being able to return the entire file length in a single call. This also assumes that the underlying device is ready and capable of returning the entire file in a single shot. Both can be untrue under certain conditions.
Here is a quick patch to allow reading more than 2GB in size (just for the diff side of things currently):
`read` and `write` return a signed int, meaning that they can only read
up to 2 billion bytes (2GB) at a time. bsdiff and bspatch were expecting
the entire file to be read (or written, respectively) in a single call
to `read` or `write`, which is only possible if they are less than 2GB
in size. There are also other times in which a single function call
would be inadequate for IO, for instance in the case where a device is
busy. The fix for this was to place the functions in a loop and continue
as long as at least 1 byte was transferred (in or out). If an error, or 0
return value, comes back from the transfer, break out of the loop and
return the total number of bytes that had been transferred up to that
point.
Updated the .gitignore file to ignore vim swap files, as well as the
autoconf (generated) files and the executables.
As it currently stands, the code only supports files up to 2GB in size, as it relies on
read
being able to return the entire file length in a single call. This also assumes that the underlying device is ready and capable of returning the entire file in a single shot. Both can be untrue under certain conditions.Here is a quick patch to allow reading more than 2GB in size (just for the diff side of things currently):
The text was updated successfully, but these errors were encountered: