mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
radv/rra: Use memcpy for chunk descriptions
The identifier is not null terminated. "HistoryTokensRaw" does not fit otherwise. Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25548>
This commit is contained in:
parent
71c363acc3
commit
dc813288c3
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ rra_dump_chunk_description(uint64_t offset, uint64_t header_size, uint64_t data_
|
|||
.data_offset = offset + header_size,
|
||||
.data_size = data_size,
|
||||
};
|
||||
strncpy(chunk.name, name, sizeof(chunk.name) - 1);
|
||||
memcpy(chunk.name, name, strnlen(name, sizeof(chunk.name)));
|
||||
fwrite(&chunk, sizeof(struct rra_file_chunk_description), 1, output);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue