[PATCH] glx/vndcmds: Fix vendor hash table key size

Vladimir Panteleev git at thecybershadow.net
Wed Jun 20 13:37:45 UTC 2018


The keySize parameter of the hashing/comparison functions was
incorrectly specified to be sizeof(void*), even though the keys of
this hashtable are CARD32.

Fixes address sanitizer failure on 64-bit builds.
---
 glx/vndcmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glx/vndcmds.c b/glx/vndcmds.c
index 493e2bfc0..45b1eafaa 100644
--- a/glx/vndcmds.c
+++ b/glx/vndcmds.c
@@ -50,7 +50,7 @@ typedef struct GlxVendorPrivDispatchRec {
 static GlxServerDispatchProc dispatchFuncs[OPCODE_ARRAY_LEN] = {};
 static HashTable vendorPrivHash = NULL;
 static HtGenericHashSetupRec vendorPrivSetup = {
-    .keySize = sizeof(void*)
+    .keySize = sizeof(CARD32)
 };
 
 static int DispatchBadRequest(ClientPtr client)
-- 
2.17.1



More information about the xorg-devel mailing list