Add some bounds checking to _reply functions
This is a step towards fixing a security vulnerability. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
parent
06be1d845f
commit
f96f84ee45
|
@ -2571,6 +2571,8 @@ def _c_reply(self, name):
|
|||
# certain variable size fields need to be unserialized explicitly
|
||||
_c(' %s *reply = (%s *) xcb_wait_for_reply_safe(c, cookie.sequence, e, sizeof (*reply));',
|
||||
self.c_reply_type, self.c_reply_type)
|
||||
_c(' if (!reply)')
|
||||
_c(' return NULL;')
|
||||
_c(' int i;')
|
||||
|
||||
for field in unserialize_fields:
|
||||
|
|
Loading…
Reference in New Issue