mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 15:50:05 +01:00
xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675)
You could be more clever than this, but the wire protocol says this
really is an array of not more than 255 ARRAY8, so it's not just a
matter of changing the types.
(cherry picked from commit 0eb19f9437)
This commit is contained in:
parent
396d3a7762
commit
606f6dba16
1 changed files with 3 additions and 1 deletions
|
|
@ -491,7 +491,9 @@ XdmcpRegisterConnection (
|
|||
return;
|
||||
}
|
||||
}
|
||||
newAddress = (CARD8 *) xalloc (addrlen * sizeof (CARD8));
|
||||
if (ConnectionAddresses.length + 1 == 256)
|
||||
return;
|
||||
newAddress = xalloc (addrlen * sizeof (CARD8));
|
||||
if (!newAddress)
|
||||
return;
|
||||
if (!XdmcpReallocARRAY16 (&ConnectionTypes, ConnectionTypes.length + 1))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue