summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devices/gdevlp8k.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/devices/gdevlp8k.c b/devices/gdevlp8k.c
index 0a9bc03c8..55af94df0 100644
--- a/devices/gdevlp8k.c
+++ b/devices/gdevlp8k.c
@@ -185,7 +185,10 @@ lp8000_print_page(gx_device_printer *pdev, gp_file *prn_stream)
185 unsigned int report_size; 185 unsigned int report_size;
186 186
187 byte *buf1 = (byte *)gs_malloc(pdev->memory, in_size, 1, "lp8000_print_page(buf1)"); 187 byte *buf1 = (byte *)gs_malloc(pdev->memory, in_size, 1, "lp8000_print_page(buf1)");
188 byte *buf2 = (byte *)gs_malloc(pdev->memory, in_size, 1, "lp8000_print_page(buf2)"); 188
189 /* Worst case for rle compression below is 3 bytes for each 2 bytes of
190 input, with extra final byte. */
191 byte *buf2 = (byte *)gs_malloc(pdev->memory, in_size * 3 / 2 + 2, 1, "lp8000_print_page(buf2)");
189 byte *in = buf1; 192 byte *in = buf1;
190 byte *out = buf2; 193 byte *out = buf2;
191 194