sonyupdneo: Fix buffer overflow with multi-page jobs.

This commit is contained in:
Solomon Peachy 2019-05-23 09:04:29 -04:00
parent 91fbb909ae
commit 1f2b68e6b9
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ static int updneo_read_parse(void *vctx, const void **vjob, int data_fd, int cop
/* Behavior based on the various blocks */
if (!strncmp("PJL-T", tok, 5))
run = 1;
run = 0;
else if (!strncmp("SONY-PDL-DS2", tok, 12))
job->payload_offset = job->datalen;
@ -330,7 +330,7 @@ static const char *sonyupdneo_prefixes[] = {
struct dyesub_backend sonyupdneo_backend = {
.name = "Sony UP-D Neo",
.version = "0.01WIP",
.version = "0.02WIP",
.uri_prefixes = sonyupdneo_prefixes,
.cmdline_arg = updneo_cmdline_arg,
.init = updneo_init,