Merge branch 'bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r15' into maint-r15

* bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r15:
  [megaco] Used wrong downgrade tag for (flex) handler
  [megaco] Fixrd appup sub-test suite
  [megaco] Debug printouts in megaco test server
  [megaco] Internal test server not handling failing cases
  [megaco] Fix merge
  [megaco] Misc codec tickets test case fixes
  [megaco] Misc fixes of the (internal) megaco test server
  Changed name of test case functions (from seq12263 to otp10998)
  Assign correct version and updated release notes accordingly.
  Removed comments
  Ensure of incorrect number of terms when scanning property groups
  Uncommented test cases
  Add new messages
  Calculation of term_spec size (initial and next) changed
  Minor test case rework
  Test case cleanup
  Add rule for test beam'es
  Preliminary test case updates
Make ssh_cli.erl handle <CTRL>+C

Dear all,

I've found that ssh_cli.erl does not scan the input received from the
remote for occurrences of <CTRL>+C to signal the user's interrupt
requests to the group_leader of the CLI session. The patch attached to
this e-mail fixes the issue.

Kind regards,

--
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: stefan.zegenhagen@arcutronix.com
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

>From f1d056ed1bf419677098cdc57bc7ce8a327e6b43 Mon Sep 17 00:00:00 2001
From: Stefan Zegenhagen <stefan.zegenhagen@arcutronix.com>
Date: Mon, 6 May 2013 14:29:45 +0200
Subject: [PATCH] [SSH-CLI] properly handle <CTRL>+C as shell interrupt

In ssh_cli.erl, check for the presence of <CTRL>+C in data received from
the remote. If detected, use the established mechanism (send an
'interrupt' exit signal to the group_leader) to signal an interrupt to
the shell.
handle_info Info type possible typo

Should it be 'timeout' instead of timeout(), as in doc: http://www.erlang.org/doc/man/gen_server.html#Module:handle_info-2?
SNMP/VACM: bugfix for vacmViewTreeFamilyMask

Dear all,

it's almost a year since I sent the patch attached to this e-mail, and I
just found out that I have not yet gotten a response to it.

I would consider this patch important because it fixes an issue with the
interpretation of data that might be critical for SNMPv3 operation. I
confirmed at that time that erlangs interpretation of
vacmViewTreeFamilyMask is indeed not interoperable with other SNMP
stacks.

Kind regards,

> > > the implementation of SNMP-VIEW-BASED-ACM.mib assumes that the input for
> > > vacmViewTreeFamilyMask is an OID consisting of 1's and 0's only to form
> > > the mask. However, the MIB states that the input should be a bitstring.
> > >
> > > The OID representation of the mask is useful in the code as it speeds up
> > > time-critical code paths when checking access permissions for EACH SNMP
> > > access. Reading/writing the view mask objects is less time-critical.
> > >
> > > Therefore, to fix the issue, convert between OID representation and
> > > bitstring when the vacmViewTreeFamilyMask objects are accessed. This is
> > > done by the patch attached to this e-mail.
>
>
> I'm very sorry for the troubles that I am causing but it seems that the
> previous version of the patch did more than it should: the OID-bitstring
> conversion was also applied to other tables in the same MIB on
> get/get-next requests.
>
> The version of the patch that is attached to this e-mail restricts the
> OID-bitstring conversion to vacmViewTreeFamilyMask alone.

--
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: stefan.zegenhagen@arcutronix.com
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

>From aa2acfb8a0b5ae05fc5ba982d78ee5607384a2be Mon Sep 17 00:00:00 2001
From: Stefan Zegenhagen <stefan.zegenhagen@arcutronix.com>
Date: Wed, 1 Aug 2012 09:56:15 +0200
Subject: [PATCH] bugfix for vacmViewTreeFamilyMask

The vacmViewTreeFamilyMask is defined to be a bit string in the MIB, not
an OID. However, the MIB implementation assumed the latter, effectively
rendering all attempts to read/set masks via SNMP unsuccessful.

Since the mask is used in hot paths (e.g. access permission checks for
each SNMP operation, the OID representation of the mask has benefits
(e.g. faster processing). Therefore, convert the bitstring to/from its
OID representation when reading/setting any mask object.
crypto: Fix some compiler warnings
crypto: Refactor remove resource for EC_KEY

The resource was not needed as it was never kept between external
crypto calls.
crypto: Supress some false positives from valgrind
Fix list-valued Vendor-Specific-Application-Id config

Commit f0a36c79 broke the handling of such configuration, resulting in a
function clause error in diameter_capx if the list was not of length 3,
and faulty extraction of application id's otherwise.  Only record-valued
config was properly interpreted.
Fix external term format BIFs on floating point middle-endian machines

This complements 933e701 (OTP-10209).

Simple error example:
1> <<131,70,63,240,0,0,0,0,0,0>> = term_to_binary(1.0, [{minor_version,1}]).
** exception error: no match of right hand side value <<131,70,0,0,0,0,63,240,0,0>>
2> 1.0 = binary_to_term(<<131,70,63,240,0,0,0,0,0,0>>).
** exception error: no match of right hand side value 5.299808824e-315

But roundtrip always works:
3> 1.0 = binary_to_term(term_to_binary(1.0, [{minor_version,1}])).
1.0
Fix erlang:phash2() on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test case
"hash_SUITE:test_phash2/1" fails.

Simple error example:
1> 77147068 = erlang:phash2(1.0).
** exception error: no match of right hand side value 50524433
Fix binary matching on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test case
"bs_match_misc_SUITE:t_float/1" fails.

Simple error example:
1> <<_,_,_,_,_,_,_,_>> = <<1.25/float>>.
<<63,244,0,0,0,0,0,0>>
2> <<1.25/float>> = <<63,244,0,0,0,0,0,0>>.
** exception error: no match of right hand side value <<63,244,0,0,0,0,0,0>>

The additional test case is added because in a former version of this
patch the ERTS_FP_ERROR_THOROUGH check for NaN/infinity was mistakenly
applied on the still word-switched double.
Fix binary construction on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test cases
"in_guard/1" and "coerce_to_float/1" in bs_construct_SUITE fail.

The added lines in bs_construct_SUITE cover all branches that were not
covered before (small and big numbers if BIT_OFFSET(erts_bin_offset) != 0).
erts: Fix memory leak in term_to_binary/2 with compressed option
Merge branch 'anders/diameter/vendor_specific_function_clause/OTP-11165' into maint

* anders/diameter/vendor_specific_function_clause/OTP-11165:
  Fix list-valued Vendor-Specific-Application-Id config
httpc: Allow content body in DELETE requests
Improve solution
Merge branch 'raimo/race-in-prim_inet-close/OTP-10497' into maint

* raimo/race-in-prim_inet-close/OTP-10497:
  Improve solution
Merge branch 'sverk/term_to_binary-memleak' into maint

* sverk/term_to_binary-memleak:
  erts: Fix memory leak in term_to_binary/2 with compressed option
ssh: Not run chmod every lookup
Prepare release