mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
asahi: decode: Do not assert on buffer overruns
This kills the hypervisor, let's just print and return. Also flush after decoding, so that if something else goes wrong at least we get the logs up to that point. Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
parent
acd5ed0451
commit
0424017e72
1 changed files with 5 additions and 2 deletions
|
|
@ -486,10 +486,13 @@ agxdecode_usc(const uint8_t *map, UNUSED uint64_t *link, UNUSED bool verbose,
|
|||
|
||||
#define PPP_PRINT(map, header_name, struct_name, human) \
|
||||
if (hdr.header_name) { \
|
||||
assert(((map + AGX_##struct_name##_LENGTH) <= (base + size)) && \
|
||||
"buffer overrun in PPP update"); \
|
||||
if (((map + AGX_##struct_name##_LENGTH) > (base + size))) { \
|
||||
fprintf(agxdecode_dump_stream, "Buffer overrun in PPP update\n"); \
|
||||
return; \
|
||||
} \
|
||||
DUMP_CL(struct_name, map, human); \
|
||||
map += AGX_##struct_name##_LENGTH; \
|
||||
fflush(agxdecode_dump_stream); \
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue