]> granicus.if.org Git - python/commit
bpo-35050: AF_ALG length check off-by-one error (GH-10058)
authorChristian Heimes <christian@python.org>
Mon, 10 Dec 2018 10:22:37 +0000 (11:22 +0100)
committerVictor Stinner <vstinner@redhat.com>
Mon, 10 Dec 2018 10:22:37 +0000 (11:22 +0100)
commit2eb6ad8578fa9d764c21a92acd8e054e3202ad19
treeec8156905638640f904aa7f692e2cbdbe861e38b
parent8e0418688906206fe59bd26344320c0fc026849e
bpo-35050: AF_ALG length check off-by-one error (GH-10058)

The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.

Signed-off-by: Christian Heimes <christian@python.org>
Lib/test/test_socket.py
Misc/NEWS.d/next/Core and Builtins/2018-10-23-15-03-53.bpo-35050.49wraS.rst [new file with mode: 0644]
Modules/socketmodule.c