Mercurial > hg > dmlib
changeset 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 | 5d9dd663df8d |
children | f382cde6bb58 |
files | tools/lib64gfx.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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);