From 53c44a667db02ed88ffd710937f4487f95a38eb1 Mon Sep 17 00:00:00 2001 From: Dennis Oberst Date: Fri, 5 Sep 2025 08:48:29 +0200 Subject: [PATCH] QGrpcHttp2Channel: fix illegal access when printing We are constructing 'hostUri' at this point. Don't use it for printing. Coverity-Id: 894268 Pick-to: 6.8 Change-Id: I2b478de2d3865112978202959e1af07b17f7751a Reviewed-by: Alexey Edelev (cherry picked from commit b86f9cb5d9bb8ce5036901c3d25b053554aba87f) (cherry picked from commit 39db74769a25b124bc3ade727a518aeeb5dacd7d) Reviewed-by: Qt Cherry-pick Bot --- src/grpc/qgrpchttp2channel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grpc/qgrpchttp2channel.cpp b/src/grpc/qgrpchttp2channel.cpp index 10620113..088b4cfb 100644 --- a/src/grpc/qgrpchttp2channel.cpp +++ b/src/grpc/qgrpchttp2channel.cpp @@ -1029,7 +1029,7 @@ QUrl QGrpcHttp2ChannelPrivate::sanitizeHostUri(const QUrl &rawUri, if (rawUri.scheme() != expected) { qCWarning(lcChannel, "[%p] Unsupported transport protocol scheme '%s'. Fall back to '%s'.", this, - qPrintable(hostUri.scheme()), qPrintable(expected)); + qPrintable(rawUri.scheme()), qPrintable(expected)); sanitizedUri.setScheme(expected); } };