FreeBSD/src 0420785sys/netipsec key.c

pfkey2: use correct value for a key length

The length of key data is specified via sadb_key_bits field.
Use specified size for buffer allocation and key copying.
Also add a check that the value of sadb_key_bits is not zero,
as explicitly required in RFC 2367.

PR:             241010
Submitted by:   jean-francois.hren at stormshield eu
MFC after:      1 week
DeltaFile
+14-5sys/netipsec/key.c
+14-51 files

UnifiedSplitRaw