summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-22 16:05:08 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-22 16:05:08 +0000
commit38f7e0d13576b550122e3bd9a80990a87451a0bd (patch)
tree1b438392a77a0916236c08b96b9ee84d0b61f4fa /lib
parent757752831e84c46cae1ce2999ca56c7705643d38 (diff)
Check strlen(spec) only once at the beginning of XLookupColor().
Also remove a superfluous include. This synchronises -current with upstream and the code we shipped in the errata. OK matthieu@
Diffstat (limited to 'lib')
-rw-r--r--lib/libX11/src/LookupCol.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/libX11/src/LookupCol.c b/lib/libX11/src/LookupCol.c
index 12cf0793f..cd9b13684 100644
--- a/lib/libX11/src/LookupCol.c
+++ b/lib/libX11/src/LookupCol.c
@@ -29,7 +29,6 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <limits.h>
#include <stdio.h>
-#include <sys/limits.h>
#include "Xlibint.h"
#include "Xcmsint.h"
@@ -82,10 +81,6 @@ XLookupColor (
* Xcms and i18n methods failed, so lets pass it to the server
* for parsing.
*/
-
- n = (int) strlen (spec);
- if (n > SHRT_MAX)
- return(0);
LockDisplay(dpy);
GetReq (LookupColor, req);
req->cmap = cmap;