764fdb6d82
Resolves: #2159489
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From da6398e4e13aa2866232df6f896c75751cc7cb46 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Tue, 20 Dec 2022 11:40:16 +1000
|
|
Subject: [PATCH xserver 2/3] dix: localize two variables
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
(cherry picked from commit f69280ddcdd3115ee4717f22e85e0f43569b60dd)
|
|
---
|
|
dix/dispatch.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/dix/dispatch.c b/dix/dispatch.c
|
|
index 4fc99b170..2efa2dcf1 100644
|
|
--- a/dix/dispatch.c
|
|
+++ b/dix/dispatch.c
|
|
@@ -3771,14 +3771,11 @@ int
|
|
ProcEstablishConnection(ClientPtr client)
|
|
{
|
|
const char *reason;
|
|
- char *auth_proto, *auth_string;
|
|
xConnClientPrefix *prefix;
|
|
|
|
REQUEST(xReq);
|
|
|
|
prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
|
|
- auth_proto = (char *) prefix + sz_xConnClientPrefix;
|
|
- auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
|
|
|
|
if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix +
|
|
pad_to_int32(prefix->nbytesAuthProto) +
|
|
@@ -3787,12 +3784,15 @@ ProcEstablishConnection(ClientPtr client)
|
|
else if ((prefix->majorVersion != X_PROTOCOL) ||
|
|
(prefix->minorVersion != X_PROTOCOL_REVISION))
|
|
reason = "Protocol version mismatch";
|
|
- else
|
|
+ else {
|
|
+ char *auth_proto = (char *) prefix + sz_xConnClientPrefix;
|
|
+ char *auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
|
|
reason = ClientAuthorized(client,
|
|
(unsigned short) prefix->nbytesAuthProto,
|
|
auth_proto,
|
|
(unsigned short) prefix->nbytesAuthString,
|
|
auth_string);
|
|
+ }
|
|
|
|
return (SendConnSetup(client, reason));
|
|
}
|
|
--
|
|
2.39.0
|
|
|