ksmserver: Fix copying of auth data
- ksmserver: Fix copying of auth data
Despite IceGenerateMagicCookie returning null terminated char*, the data itself is pure data may contain null bytes. For this reason we must copy the entire data_length, and not use string functions.
This fixes a bug where 1 in 10 logins would not have working session management if the generated data happened to contain a null byte.
Thanks to Matt Whitlock kde@mattwhitlock.name
(cherry picked from commit 2c2f7a84)
c567ada7 ksmserver: Fix copying of auth data
Co-authored-by: David Edmundson kde@davidedmundson.co.uk
(cherry picked from commit 8ee3defd)
Co-authored-by: David Edmundson david@davidedmundson.co.uk
Co-authoredception