diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2018-09-30 10:40:20 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2018-09-30 10:40:20 -0400 |
commit | 046d963b2a26f8da9644d5c6f73bdaaf25102690 (patch) | |
tree | d7d9ce095d2679f5a37a6a60d86c67ab2e0abccf /backend_mitsu9550.c | |
parent | f9c688176a06f2878a61c92c2aa9e4df134822e3 (diff) | |
download | selphy_print-046d963b2a26f8da9644d5c6f73bdaaf25102690.tar.gz selphy_print-046d963b2a26f8da9644d5c6f73bdaaf25102690.tar.bz2 selphy_print-046d963b2a26f8da9644d5c6f73bdaaf25102690.zip |
mitsu9810: reserve a little extra space for the lamination data.
(prevents a buffer overflow when on 5" media)
Diffstat (limited to 'backend_mitsu9550.c')
-rw-r--r-- | backend_mitsu9550.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend_mitsu9550.c b/backend_mitsu9550.c index 923f6bd..a27afce 100644 --- a/backend_mitsu9550.c +++ b/backend_mitsu9550.c @@ -1202,7 +1202,7 @@ static int mitsu9550_main_loop(void *vctx, const void *vjob) { int i, remain, planelen; planelen = job->rows * job->cols * 2; - remain = (job->hdr1.matte ? 4 : 3) * (planelen + sizeof(struct mitsu9550_plane)) + sizeof(struct mitsu9550_cmd) * (job->hdr1.matte? 2 : 1); + remain = (job->hdr1.matte ? 4 : 3) * (planelen + sizeof(struct mitsu9550_plane)) + sizeof(struct mitsu9550_cmd) * (job->hdr1.matte? 2 : 1) + LAMINATE_STRIDE * 2; newbuf = malloc(remain); if (!newbuf) { ERROR("Memory allocation Failure!\n"); @@ -1738,7 +1738,7 @@ static const char *mitsu9550_prefixes[] = { /* Exported */ struct dyesub_backend mitsu9550_backend = { .name = "Mitsubishi CP9xxx family", - .version = "0.43", + .version = "0.44", .uri_prefixes = mitsu9550_prefixes, .cmdline_usage = mitsu9550_cmdline, .cmdline_arg = mitsu9550_cmdline_arg, |