]> git.ipfire.org Git - thirdparty/libarchive.git/commit
iso9660: Fix OOB in Joliet ID generation 2974/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 21 Apr 2026 16:46:28 +0000 (18:46 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 9 May 2026 10:31:34 +0000 (12:31 +0200)
commita9d2cc5e07013d1af794e41ddbfac79da906d5f9
tree933d0993a563ef49d3d88299f455966c3803dcb7
parent77c991bde90a1c702797df99d7ba1759d0026ce6
iso9660: Fix OOB in Joliet ID generation

Allocate enough memory for possible addition of 3 characters within the
range of 0-Z. Since UTF-16 is in use, allocate 6 bytes + 2 bytes for the
terminating NUL character.

Also keep in mind that "l" is already size in bytes, which means that a
multiplication of 2 is not needed (and prevented overflow issues with
longer filenames).

Resolves #2935.

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