| Summary: |
Wrong argument types in declaration and realisation (tested on XSetScreenSaver()) |
| Product: |
xorg
|
Reporter: |
Sir Raorn <raorn> |
| Component: |
Lib/Xlib | Assignee: |
Xorg Project Team <xorg-team> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
Xorg Project Team <xorg-team> |
| Severity: |
normal
|
|
|
| Priority: |
high
|
CC: |
shrek
|
| Version: |
unspecified | |
|
| Hardware: |
All | |
|
| OS: |
All | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Rumours says, that XSetScreenSaver() accepts int's as timeout and interval arguments. In fact, these values are limited to signed short int: xc/lib/X11/SetSSaver.c: int XSetScreenSaver(dpy, timeout, interval, prefer_blank, allow_exp) register Display *dpy; int timeout, interval, prefer_blank, allow_exp; { register xSetScreenSaverReq *req; LockDisplay(dpy); GetReq(SetScreenSaver, req); req->timeout = timeout; req->interval = interval; req->preferBlank = prefer_blank; req->allowExpose = allow_exp; UnlockDisplay(dpy); SyncHandle(); return 1; } xc/include/Xproto.h: typedef struct { CARD8 reqType; BYTE pad; CARD16 length B16; INT16 timeout B16, interval B16; BYTE preferBlank, allowExpose; CARD16 pad2 B16; } xSetScreenSaverReq; INT16 and B16 are defined in xc/include/Xmd.h Steps to reproduce: $ xset s 43200 0 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 107 (X_SetScreenSaver) Value in failed request: 0xffffa8c0 Serial number of failed request: 8 Current serial number in output stream: 9 43200 - timeout value (12 hours), 0xffffa8c0 - 43200 (0x0000a8c0) threated as signed short value.