[31599] in CVS-changelog-for-Kerberos-V5
krb5 commit: Terminate HTTPS read buffer when allocating it
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Mon Nov 2 16:30:56 2026
From: ghudson@mit.edu
To: cvs-krb5@mit.edu
Message-Id: <20261102213051.9E9D31057F2@krbdev.mit.edu>
Date: Mon, 2 Nov 2026 16:30:51 -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/f47a009e26c8a90465d7971cb5a37e5c33f7d379
commit f47a009e26c8a90465d7971cb5a37e5c33f7d379
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]
ticket: 9725 (new)
tags: pullup
target_version: 1.22-next
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