Skip to content

Commit 2e99e6e

Browse files
committed
Fix cupsRasterReadHeader regression.
Report I/O errors. Finish migration of testraster to test-internal.h.
1 parent d2a3eff commit 2e99e6e

2 files changed

Lines changed: 94 additions & 76 deletions

File tree

cups/raster-stream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ cupsRasterReadHeader(
847847

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

850-
return (0);
850+
return (1);
851851
}
852852

853853

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

13951395
DEBUG_printf("6cups_raster_io: count=%d, total=%d", (int)count, (int)total);
13961396
if (count == 0)
1397+
{
13971398
break;
1399+
}
13981400
else if (count < 0)
13991401
{
1402+
_cupsRasterAddError("I/O error");
14001403
DEBUG_puts("6cups_raster_io: Returning -1 on error.");
14011404
return (-1);
14021405
}

0 commit comments

Comments
 (0)