Skip to content
  • Vlad Zahorodnii's avatar
    platforms/drm: Fix potential stack corruption · b3e70318
    Vlad Zahorodnii authored
    If the file descriptor of the DRM device is greater than FD_SETSIZE, the
    stack will be corrupted. However, it is highly unlikely that we ever hit
    this case because DRM devices are opened at startup of kwin, so the file
    descriptors should small.
    
    In order to prevent the potential stack corruption, this change replaces
    the usage of select() with poll().
    
    Unlike select(), the api of poll() is much more sensible. Back 20 or so
    years ago the main argument against poll() was that it's not implemented
    by all platforms. But, nowadays, it's supported on all major platforms.
    b3e70318