summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-01-15 23:01:03 +0100
committerBas Nieuwenhuizen <[email protected]>2017-01-17 20:54:57 +0100
commit3b4bf8aa636768f4ad5fb636b8406e58d0d78f62 (patch)
treeedca70309d059ad9b3e33e4c4d5fe1aa139de600
parent57f18623fb94891c04f3a395cfd977ea3747ee61 (diff)
ac/debug: Decrease num_dw for type 2 NOP's.
Otherwise we read past the end of the buffer. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/amd/common/ac_debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
index f91e448a47f..989dfda4ff9 100644
--- a/src/amd/common/ac_debug.c
+++ b/src/amd/common/ac_debug.c
@@ -357,6 +357,7 @@ void ac_parse_ib(FILE *f, uint32_t *ib, int num_dw, int trace_id,
if (ib[0] == 0x80000000) {
fprintf(f, COLOR_GREEN "NOP (type 2)" COLOR_RESET "\n");
ib++;
+ num_dw--;
break;
}
/* fall through */