Mercurial > hg > dmlib
comparison 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 |
comparison
equal
deleted
inserted
replaced
1857:5d9dd663df8d | 1858:1816211341a0 |
---|---|
893 i, op->type, subjname, op->offs, op->offs, op->bank, | 893 i, op->type, subjname, op->offs, op->offs, op->bank, |
894 size, size, op->size, op->size); | 894 size, size, op->size, op->size); |
895 } | 895 } |
896 | 896 |
897 // Is the operation inside the bounds? | 897 // Is the operation inside the bounds? |
898 if (op->offs + size > buf->len + 1) | 898 if (op->type == DO_COPY && op->offs + size > buf->len + 1) |
899 { | 899 { |
900 return dmError(DMERR_INVALID_DATA, | 900 return dmError(DMERR_INVALID_DATA, |
901 "Decode DATA out of bounds, op #%d type=%d, subj=%s, offs=%d ($%04x), " | 901 "Decode SRC out of bounds, op #%d type=%d, subj=%s, offs=%d ($%04x), " |
902 "bank=%d, size=%d ($%04x) @ %d ($%04x)\n", | 902 "bank=%d, size=%d ($%04x) @ %d ($%04x)\n", |
903 i, op->type, subjname, op->offs, op->offs, op->bank, | 903 i, op->type, subjname, op->offs, op->offs, op->bank, |
904 size, size, buf->len, buf->len); | 904 size, size, buf->len, buf->len); |
905 } | 905 } |
906 | 906 |