mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-08 18:28:43 +00:00
record: Fix undefined memcpy in RecordAClientStateChange
From Adam Jackson f44ac101c523a0439bd1a864850e3c1a4e154549 in xserver git avoids a large number of malloc(0) calls ok deraadt@ who had almost the same diff
This commit is contained in:
@@ -2728,7 +2728,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, void *nulldata,
|
||||
case ClientStateRetained: /* client disconnected */
|
||||
|
||||
/* RecordDisableContext modifies contents of ppAllContexts. */
|
||||
numContextsCopy = numContexts;
|
||||
if (!(numContextsCopy = numContexts))
|
||||
break;
|
||||
ppAllContextsCopy = xallocarray(numContextsCopy,
|
||||
sizeof(RecordContextPtr));
|
||||
assert(ppAllContextsCopy);
|
||||
|
||||
Reference in New Issue
Block a user