]> git.ipfire.org Git - thirdparty/libarchive.git/commit
tar: Always use correct length in safe_fprintf
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 16 May 2025 21:08:59 +0000 (23:08 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 16 May 2025 22:22:15 +0000 (00:22 +0200)
commit0e15b864c10ddba8095d452ca6cc9a9e085dee43
treef7d71dd4d3d67303b9ca455bdebf852bb7bb3498
parent3f1e45d14673f2a85fb051198c01884a1362a106
tar: Always use correct length in safe_fprintf

If the format buffer shall not be further increased in size, the
length value mistakenly takes the terminating nul byte into account.

This is in contrast to a successful vsnprintf call.

Also use the correct string length if fallback to stack buffer is
required.

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