XChangeProperty regression
Date: Fri, 28 May 2021 13:48:53 +0200
From: Karsten Trulsen <karstent@math.uio.no>
To: matthieu@herrb.eu
Subject: Regarding: Reject string longer than USHRT_MAX before sending them on the wire
Dear Matthieu Herrb
if (strlen(name) >= USHRT_MAX) return 0; return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, /* */ 8, PropModeReplace, (_Xconst unsigned char *)name, name ? (int) strlen(name) : 0);
The test recently added, to avoid long strings, unfortunately fails with segmentation fault if name is NULL.
For the function XChangeProperty it is not an error if name i NULL.
This change breaks valid code.
Best regards, Karsten Trulsen
Edited by Matthieu Herrb