trace.c: mtrace_event: fix memcpy_s( dest_size ) argument

Found by chance while looking for something else.

This makes no difference right now because we checked the "length" in
the line immediately before but let's do the right thing anyway, at the
very least it's more readable.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-06-19 01:17:47 +00:00 committed by Liam Girdwood
parent a0743971c9
commit 3674c0f113
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ static inline void mtrace_event(const char *data, uint32_t length)
trace->pos = 0;
}
memcpy_s(t + trace->pos, MAILBOX_TRACE_SIZE,
memcpy_s(t + trace->pos, MAILBOX_TRACE_SIZE - trace->pos,
data, length);
dcache_writeback_region(t + trace->pos, length);
trace->pos += length;