diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2019-11-11 20:14:36 -0800 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2019-11-13 08:19:05 -0800 |
commit | f63270230f329c6e89375af18d2bf2930421174a (patch) | |
tree | 97275cb35c3aa08663f0aff3c74fa2ae41c4a7f3 /devices/gdevbj10.c | |
parent | 97277fcf0f70d482481ac329ce473e5687e7a935 (diff) | |
download | ghostpdl-f63270230f329c6e89375af18d2bf2930421174a.tar.gz |
Fix devices that ignore return codes from gdev_prn get_bits & copy_scan_lines
Discovered these when working on bug 701845 'devicen' device. Checking
uncovered a plethora of other places that used one of these functions
assuming success.
Also the gdev_prn_copy_scan_lines had places that assumed the return code
was a valid line_count, so if negative, could memset many lines in front of
an allocated buffer.
The code in a few of these usages is strange, and we don't have a way to
check them, so this may not match the original intent.
Also, while perusing all of these files, check devices for alloc's that
assume success and fix them (usually return gs_error_VMerror).
Diffstat (limited to 'devices/gdevbj10.c')
-rw-r--r-- | devices/gdevbj10.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/devices/gdevbj10.c b/devices/gdevbj10.c index 00f8569e9..3423ebc57 100644 --- a/devices/gdevbj10.c +++ b/devices/gdevbj10.c @@ -312,7 +312,8 @@ bj10e_print_page(gx_device_printer *pdev, gp_file *prn_stream) /* Copy 1 scan line and test for all zero. */ code = gdev_prn_get_bits(pdev, lnum, in, &in_data); - if ( code < 0 ) goto xit; + if ( code < 0 ) + goto fin; /* The mem... or str... functions should be faster than */ /* the following code, but all systems seem to implement */ /* them so badly that this code is faster. */ |