We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://www.erlang.org/doc/man/file.html#pread-3 could return {ok, Data} which size less than the Number argument.
{ok, Data}
Number
We need to handle this kind of return values.
The text was updated successfully, but these errors were encountered:
I've implemented a wrapper function of file:pread/3 as follows:
file:pread/3
Sorry, something went wrong.
@yosukehara LGTM.
Anyway, It seems that functions using efile_read|efile_pread in the file module like
efile_read
efile_pread
could return a object which size less than we expected.
https://github.com/erlang/otp/blob/OTP-17.5.6/erts/emulator/drivers/common/efile_drv.c#L1144 https://github.com/erlang/otp/blob/OTP-17.5.6/erts/emulator/drivers/common/efile_drv.c#L1322 https://github.com/erlang/otp/blob/OTP-17.5.6/erts/emulator/drivers/common/efile_drv.c#L1370
https://github.com/erlang/otp/blob/OTP-17.5.6/erts/emulator/drivers/unix/unix_efile.c#L667 https://github.com/erlang/otp/blob/OTP-17.5.6/erts/emulator/drivers/unix/unix_efile.c#L700
leo-project/leo_object_storage@11680b7
yosukehara
No branches or pull requests
http://www.erlang.org/doc/man/file.html#pread-3 could return
{ok, Data}
which size less than theNumber
argument.We need to handle this kind of return values.
The text was updated successfully, but these errors were encountered: