Mercurial > hg > dmlib
diff tools/lib64gfx.c @ 1858:1816211341a0
Only check operator size for DO_COPY operators against source size.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 24 Jun 2018 03:37:00 +0300 |
parents | 2081bb4a998a |
children | b052754a1a23 |
line wrap: on
line diff
--- a/tools/lib64gfx.c Sun Jun 24 03:04:04 2018 +0300 +++ b/tools/lib64gfx.c Sun Jun 24 03:37:00 2018 +0300 @@ -895,10 +895,10 @@ } // Is the operation inside the bounds? - if (op->offs + size > buf->len + 1) + if (op->type == DO_COPY && op->offs + size > buf->len + 1) { return dmError(DMERR_INVALID_DATA, - "Decode DATA out of bounds, op #%d type=%d, subj=%s, offs=%d ($%04x), " + "Decode SRC out of bounds, op #%d type=%d, subj=%s, offs=%d ($%04x), " "bank=%d, size=%d ($%04x) @ %d ($%04x)\n", i, op->type, subjname, op->offs, op->offs, op->bank, size, size, buf->len, buf->len);