Fix XRecordRegisterClients() Integer underflow

CVE-2020-14362 ZDI-CAN-11574

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
(cherry picked from commit 24acad216aa0fc2ac451c67b2b86db057a032050)
3 jobs for server-1.20-branch in 5 minutes and 43 seconds (queued for 1 second)
Status Job ID Name Coverage
  Docker Image
passed #4260164
debian-testing

00:00:19

 
  Build And Test
passed #4260166
autotools-build-and-test

00:05:24

passed #4260167
meson-build-and-test

00:02:29