Skip to content

Commit

Permalink
Fix cupsRasterReadHeader regression.
Browse files Browse the repository at this point in the history
Report I/O errors.

Finish migration of testraster to test-internal.h.
  • Loading branch information
michaelrsweet committed Oct 21, 2024
1 parent d2a3eff commit 2e99e6e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 76 deletions.
5 changes: 4 additions & 1 deletion cups/raster-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ cupsRasterReadHeader(

memcpy(h, &r->header, sizeof(cups_page_header_t));

return (0);
return (1);
}


Expand Down Expand Up @@ -1394,9 +1394,12 @@ cups_raster_io(cups_raster_t *r, // I - Raster stream

DEBUG_printf("6cups_raster_io: count=%d, total=%d", (int)count, (int)total);
if (count == 0)
{
break;
}
else if (count < 0)
{
_cupsRasterAddError("I/O error");
DEBUG_puts("6cups_raster_io: Returning -1 on error.");
return (-1);
}
Expand Down
Loading

0 comments on commit 2e99e6e

Please sign in to comment.