Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsRasterReadPixels doesn't handle EAGAIN correctly #473

Closed
michaelrsweet opened this issue Dec 10, 2003 · 3 comments
Closed

cupsRasterReadPixels doesn't handle EAGAIN correctly #473

michaelrsweet opened this issue Dec 10, 2003 · 3 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1-current
CUPS.org User: jlovell

In cupsRasterReadPixels errno should not be consulted when read(2) returns 0. The attached patch fixes it.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Reassigned to 1.2, and will apply.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

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

@michaelrsweet
Copy link
Collaborator Author

"raster.c.patch":

��raster.c.patch����������������������������������������������������������������������u����»üêA»üêB���mBIN�������������������e��Index: raster.c

RCS file: /home/anoncvs/cups/filter/raster.c,v
retrieving revision 1.5
diff -u -d -b -w -r1.5 raster.c
--- raster.c 17 Dec 2002 18:59:28 -0000 1.5
+++ raster.c 10 Dec 2003 23:20:48 -0000
@@ -178,12 +178,15 @@
{
bytes = read(r->fd, p, remaining);

  • if (bytes <= 0)

  • {

  •  if (errno != EAGAIN && errno != EINTR)
    
  • if (bytes == 0)
    return (0);

  •  else
    
  • if (bytes < 0)

  • {

  •  if (errno == EAGAIN || errno == EINTR)
     continue;
    
  •  else
    
  •    return (0);
    

    }

    remaining -= bytes;
    �����������

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

No branches or pull requests

1 participant