[31618] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.22]: Terminate HTTPS read buffer when allocating
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Tue Nov 3 19:18:48 2026
From: ghudson@mit.edu
To: cvs-krb5@mit.edu
Message-Id: <20261104001843.37321105851@krbdev.mit.edu>
Date: Tue, 3 Nov 2026 19:18:43 -0500 (EST)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/edc6d32f1bf68f1b11c8c95926a19acb36297a35
commit edc6d32f1bf68f1b11c8c95926a19acb36297a35
Author: Alejandro Pacheco <alepacheco99@gmail.com>
Date: Thu Oct 15 15:02:14 2026 +0200
Terminate HTTPS read buffer when allocating it
In https_read_bytes(), terminate the reply buffer immediately after
allocation, so that the strstr() call in service_https_read() is valid
even if no chunks of data are received before the TLS layer reports
end of stream.
[ghudson@mit.edu: edited commit message; split off test case into
separate commit]
(cherry picked from commit f47a009e26c8a90465d7971cb5a37e5c33f7d379)
ticket: 9725
version_fixed: 1.22.3
src/lib/krb5/os/sendto_kdc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c
index 9b51e95ae..38b52aff3 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -1313,6 +1313,7 @@ https_read_bytes(krb5_context context, struct conn_state *conn,
}
in->buf = tmp;
in->bufsize = bufsize;
+ in->buf[in->pos] = '\0';
}
st = context->tls->read(context, conn->http.tls, &in->buf[in->pos],
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5