Age | Commit message (Collapse) | Author |
|
If an IPv4 fd is opened as an IPv6 socket, unexpected behaviour can
occur. For example, if an IPv4 UDP socket is opened and passed into
Erlang as an IPv6 socket, the first 3 bytes (corresponding to 1 byte
representing the protocol family, 2 bytes set to the port) are stripped
from the payload. The cause of the UDP payload truncation happens in
inet_drv.c:packet_inet_input when a call to inet_get_address fails
silently because the family is set to PF_INET6 but the buffer len is
the size of an IPv4 struct sockaddr_in.
Prevent this behaviour by checking that the protocol family of the file
descriptor matches the family of the requested Erlang socket.
{ok, S1} = gen_udp:open(0, [binary, inet]),
{ok, FD} = inet:getfd(S1),
{ok, Port} = inet:port(S1),
{ok, S} = gen_udp:open(Port, [binary, {fd, FD}, inet6]),
{ok, C} = gen_udp:open(0, [binary]),
Msg = <<1,2,3,4,5>>,
gen_udp:send(C, "127.0.0.1", Port, Msg),
receive
{udp, S, _, _, Msg} -> ok;
{udp, S, _, _, NewMsg} -> {error, Msg, NewMsg}
end.
This test results in: {error,<<1,2,3,4,5>>,<<4,5>>}
Thanks to Andrew Tunnell-Jones for finding the bug and the test case!
|
|
* hb/kernel/opaque_decls/OTP-9337:
Modify two opaque types
|
|
Two opaque types that could cause warnings when running Dialyzer have
been modified.
|
|
* ia/ssl/ets-table-cleanup:
Corrected last argument to timer:apply_after also corrected a dilyzer spec
|
|
* ks/erl_bif_types-fixes:
Fix crash when a contract range warning is emitted for a module already in plt
Fix erroneous definition of t_binary_compiled_pattern()
|
|
|
|
Warnings about wrong contract ranges are post-processed to be displayed in the
file/line that contains the contract, although they can also be emitted while
processing other modules. For this relocation to succeed the module that
contains the contract should be currently under analysis. If this is not the
case the warning is displayed in the file/line of the call that proves the
discrepancy in the contract.
|
|
While at it:
1. Moved types in their proper place
2. Did minor cleanups and
3. Took out an unused function
|
|
A specification that could cause problems for Dialyzer has been fixed.
An opaque type in erl_eval has been turned in to a ordinary type. This
is a temporary fix.
|
|
|
|
* kenneth/asn1/longlength/OTP-9303:
Fixed DRIVER_INIT prototype
Corrected handling of long length in driver and updated test suites
|
|
|
|
* nick/orber/dialyzer_warnings/OTP-9326:
OTP-9326 Eliminated Dialyzer warnings.
|
|
* nick/Cos-Apps/remove_shy_in_doc/OTP-9319:
OTP-9319 Removed superfluous usage of shy in the documentation since it can cause problem if a buggy tool is used.
|
|
* anders/diameter/20110519/doc/OTP-9323:
Remove undocumented interface functions plus comment fix.
Various documentation fixes and improvements.
Minor diameter_service fix when sending a diameter_header/avp list
Minor make depend fixes.
Trivial depend.sed simplification.
Fix broken doc links.
Fix broken make dependencies by generating them.
|
|
|
|
Added an introductory chapter to the User's Guide as well as more
detailed release notes.
|
|
plus an example fix.
|
|
|
|
* dgud/wx/app-file/OTP-9324:
Fix wx app file, sed didn't work on all platforms
|
|
* sverker/crypto-aes-ctr-stream/OTP-9275:
Stepping vsn for R14B03
Add true streaming AES (CTR) encryption and streaming HMAC operations
|
|
|
|
* pan/stdlib_doc_fixes/OTP-9318:
Fixup of re doc and specs
|
|
* pan/win_testcases_R14B03:
Fix bug in make_del_dir testcases
Teach (prim_)file_SUITE about directory access on Windows
OTP-9325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Eliminated Dialyzer warnings.
|
|
|
|
|
|
|
|
* peppe/test_server/OTP-9249:
Add DragonflyBSD support to test_server
|
|
|
|
* dgud/mnesia/prepare-release:
Prepare mnesia release
Remove deadcode
|
|
* dgud/mnesia/fix_majority_test:
Convert majority tests to common test framework
|
|
|