krb5 commit: Terminate HTTPS read buffer when allocating it
ghudson at mit.edu
ghudson at mit.edu
Mon Nov 2 16:30:51 EST 2026
https://github.com/krb5/krb5/commit/f47a009e26c8a90465d7971cb5a37e5c33f7d379
commit f47a009e26c8a90465d7971cb5a37e5c33f7d379
Author: Alejandro Pacheco <alepacheco99 at 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 at 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],
More information about the cvs-krb5
mailing list