LPGETSTATUS ioctl passes wrong size parameter #1017

Closed
michaelrsweet opened this Issue Dec 9, 2004 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Dec 9, 2004

Version: 1.1.22
CUPS.org User: twaugh.redhat

In backend/usb-unix.c there is:

unsigned char status; /* Port status (off-line, out-of-paper, etc.) */
:
if (ioctl(fd, LPGETSTATUS, &status) == 0)

However, the LPGETSTATUS ioctl writes an int into the buffer, not a char.

Collaborator

michaelrsweet commented Dec 9, 2004

CUPS.org User: mike

Thanks, fixed for 1.2.

Collaborator

michaelrsweet commented Dec 9, 2004

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

Collaborator

michaelrsweet commented Dec 9, 2004

"cups-ioctl.patch":

--- cups-1.1.22/backend/usb-unix.c.ioctl 2004-12-09 14:35:44.271096880 +0000
+++ cups-1.1.22/backend/usb-unix.c 2004-12-09 14:36:01.761757300 +0000
@@ -89,7 +89,7 @@
struct sigaction action; /* Actions for POSIX signals /
#endif /
HAVE_SIGACTION && !HAVE_SIGSET */
#ifdef __linux

  • unsigned char status; /* Port status (off-line, out-of-paper, etc.) */
  • unsigned int status; /* Port status (off-line, out-of-paper, etc.) /
    #endif /
    __linux */

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment