glx: Fix handling of property list received from the server in glXImportContextEXT
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Dec 2011 19:15:14 +0000 (11:15 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 19 Dec 2011 22:55:30 +0000 (14:55 -0800)
commit5a849e864ea2db3b705ba301089ee2ec1fe78aa1
tree0bbdb5e7d5191d2f706d90c932b0c91290f67ef4
parent7c2f1160c23970929a2846d210357447d07ff5f0
glx: Fix handling of property list received from the server in glXImportContextEXT

The primary problem was that the number of reply bytes read is clamped
to sizeof(propList), but the loop that processes the properties tries
to examine all of the properties sent by the server.  If the server
sends 47,000 properties, we only read 3 but process all 47,000.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glx/glxcmds.c