aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2011-05-24inet: error if fd does not match socket domainMichael Santos
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!
2011-05-24Merge branch 'hb/kernel/opaque_decls/OTP-9337' into devBjörn-Egil Dahlberg
* hb/kernel/opaque_decls/OTP-9337: Modify two opaque types
2011-05-24Modify two opaque typesHans Bolinder
Two opaque types that could cause warnings when running Dialyzer have been modified.
2011-05-24Merge branch 'ia/ssl/ets-table-cleanup' into devBjörn-Egil Dahlberg
* ia/ssl/ets-table-cleanup: Corrected last argument to timer:apply_after also corrected a dilyzer spec
2011-05-24Merge branch 'ks/erl_bif_types-fixes' into devBjörn-Egil Dahlberg
* 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()
2011-05-24Corrected last argument to timer:apply_after also corrected a dilyzer specIngela Anderton Andin
2011-05-23Fix crash when a contract range warning is emitted for a module already in pltStavros Aronis
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.
2011-05-23Fix erroneous definition of t_binary_compiled_pattern()Kostis Sagonas
While at it: 1. Moved types in their proper place 2. Did minor cleanups and 3. Took out an unused function
2011-05-23Fix a spec and a typeHans Bolinder
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.
2011-05-20Update copyright yearsBjörn-Egil Dahlberg
2011-05-20Merge branch 'kenneth/asn1/longlength/OTP-9303' into devBjörn-Egil Dahlberg
* kenneth/asn1/longlength/OTP-9303: Fixed DRIVER_INIT prototype Corrected handling of long length in driver and updated test suites
2011-05-20Fixed DRIVER_INIT prototypeKenneth Lundin
2011-05-20Merge branch 'nick/orber/dialyzer_warnings/OTP-9326' into devNiclas Eklund
* nick/orber/dialyzer_warnings/OTP-9326: OTP-9326 Eliminated Dialyzer warnings.
2011-05-20Merge branch 'nick/Cos-Apps/remove_shy_in_doc/OTP-9319' into devNiclas Eklund
* 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.
2011-05-20Merge branch 'anders/diameter/20110519/doc/OTP-9323' into devAnders Svensson
* 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.
2011-05-20Remove undocumented interface functions plus comment fix.Anders Svensson
2011-05-20Various documentation fixes and improvements.Anders Svensson
Added an introductory chapter to the User's Guide as well as more detailed release notes.
2011-05-20Minor diameter_service fix when sending a diameter_header/avp listAnders Svensson
plus an example fix.
2011-05-20Minor make depend fixes.Anders Svensson
2011-05-20Merge branch 'dgud/wx/app-file/OTP-9324' into devDan Gudmundsson
* dgud/wx/app-file/OTP-9324: Fix wx app file, sed didn't work on all platforms
2011-05-19Merge branch 'sverker/crypto-aes-ctr-stream/OTP-9275' into devSverker Eriksson
* sverker/crypto-aes-ctr-stream/OTP-9275: Stepping vsn for R14B03 Add true streaming AES (CTR) encryption and streaming HMAC operations
2011-05-19Corrected handling of long length in driver and updated test suitesKenneth Lundin
2011-05-19Merge branch 'pan/stdlib_doc_fixes/OTP-9318' into devPatrik Nyblom
* pan/stdlib_doc_fixes/OTP-9318: Fixup of re doc and specs
2011-05-19Merge branch 'pan/win_testcases_R14B03' into devPatrik Nyblom
* pan/win_testcases_R14B03: Fix bug in make_del_dir testcases Teach (prim_)file_SUITE about directory access on Windows OTP-9325
2011-05-19Trivial depend.sed simplification.Anders Svensson
2011-05-19Removed unused record and fixed a few failing test cases,Niclas Eklund
2011-05-19Generic key management for test suites.Niclas Eklund
2011-05-19Some minor updates regarding how test data is generated.Niclas Eklund
2011-05-19Fixed host handling in ssh_test_lib (daemon and connect functions).Niclas Eklund
2011-05-19Fixed include problem.Niclas Eklund
2011-05-19Corrected include path and spelling of a test case function.Niclas Eklund
2011-05-19Resolved merge conflict.Niclas Eklund
2011-05-19Resolved merge issue.Niclas Eklund
2011-05-19Added code for generating certificates.Niclas Eklund
2011-05-19Altering SSH test keys.Niclas Eklund
2011-05-19Add test suite for sshBjörn-Egil Dahlberg
2011-05-19Update init_per_suite so that tests are skipped if crypto/ssh cannot be started.Lukas Larsson
2011-05-19Add cover spec fileLukas Larsson
2011-05-19Convert ssh test cases to common test stardardLukas Larsson
2011-05-19Add test suite for sshBjörn-Egil Dahlberg
2011-05-19Merge branch 'maint-r14' into devNiclas Eklund
2011-05-19OTP-9326Niclas Eklund
Eliminated Dialyzer warnings.
2011-05-19Fix wx app file, sed didn't work on all platformsDan Gudmundsson
2011-05-19Fix broken doc links.Anders Svensson
2011-05-19Fix broken make dependencies by generating them.Anders Svensson
2011-05-19Merge branch 'peppe/test_server/OTP-9249' into devPeter Andersson
* peppe/test_server/OTP-9249: Add DragonflyBSD support to test_server
2011-05-19Add DragonflyBSD support to test_serverTuncer Ayaz
2011-05-19Merge branch 'dgud/mnesia/prepare-release' into devDan Gudmundsson
* dgud/mnesia/prepare-release: Prepare mnesia release Remove deadcode
2011-05-19Merge branch 'dgud/mnesia/fix_majority_test' into devDan Gudmundsson
* dgud/mnesia/fix_majority_test: Convert majority tests to common test framework
2011-05-19Fix a bug in erl_eval(3)Hans Bolinder