mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 12:50:25 +01:00
broadcom/cle: ensure zlib inflate assign memory
This basic assertion helps static analyzer to avoid complaining that the data memory could be NULL when we copy data from there later. This fixes static analyzer warning null pointer passed to 2nd parameter expecting 'nonnull' Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39577>
This commit is contained in:
parent
5a85b3d9f4
commit
7bc1736006
1 changed files with 1 additions and 0 deletions
|
|
@ -672,6 +672,7 @@ v3d_spec_load(const struct v3d_device_info *devinfo)
|
|||
sizeof(compress_genxmls),
|
||||
(void **) &text_data);
|
||||
assert(text_offset + text_length <= total_length);
|
||||
assert(text_data);
|
||||
|
||||
buf = XML_GetBuffer(ctx.parser, text_length);
|
||||
memcpy(buf, &text_data[text_offset], text_length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue