]> git.ipfire.org Git - thirdparty/libarchive.git/commit
archive_read_set_format: Remove strcpy calls 2662/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 3 Jun 2025 15:43:27 +0000 (17:43 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 3 Jun 2025 15:43:27 +0000 (17:43 +0200)
commit5a60d8cda4c3404a7429cf093abb7bf1c9dbbfb2
tree5bac4d3babd877ade62b4d288f033d7328f4d93a
parenta8f93f2480a2a0511485e5a24cb975a0d205fec6
archive_read_set_format: Remove strcpy calls

The string constants can be used directly for comparison, which makes
this code robust against future changes which could lead to names being
longer than str could hold on stack.

Also removes around 100 bytes from compiled library (with gcc 15).

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_set_format.c