From: Douglas Bagnall Date: Sat, 14 May 2022 03:05:16 +0000 (+1200) Subject: libcli:auth:sess_crypt_blob: ensure key has 7 bytes X-Git-Tag: tevent-0.16.0~1088 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f404ef3c2aa06c801826db7d3a4cca08a60e3a0e;p=thirdparty%2Fsamba.git libcli:auth:sess_crypt_blob: ensure key has 7 bytes Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/libcli/auth/session.c b/libcli/auth/session.c index dba6c5c5b49..515b7aed629 100644 --- a/libcli/auth/session.c +++ b/libcli/auth/session.c @@ -38,6 +38,10 @@ int sess_crypt_blob(DATA_BLOB *out, const DATA_BLOB *in, const DATA_BLOB *sessio return GNUTLS_E_INVALID_REQUEST; } + if (session_key->length < 7) { + return GNUTLS_E_INVALID_REQUEST; + } + for (i=0,k=0; ilength; i += 8, k += 7) {