Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcdio: fix crash reading CD TOC on macOS Ventura #22701

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions devel/libcdio/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PortSystem 1.0

name libcdio
version 2.1.0
revision 1

categories devel
license GPL-3+
Expand Down Expand Up @@ -33,6 +34,9 @@ checksums rmd160 6b0e4917cd2dd5cac0b7afdb70789bf0ad2aed79 \
# doesn't understand the pramga usage in the Tiger headers - gcc bug 50909
patchfiles patch-libcdio-lib-iso9660-move-pragma.diff

# Remove the unecessary addtional byte added to the TOC buffer
patchfiles-append remove-additional-byte-TOC-buffer.diff

configure.args --disable-rpath \
--disable-silent-rules

Expand Down
12 changes: 12 additions & 0 deletions devel/libcdio/files/remove-additional-byte-TOC-buffer.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Upstream patch: https://git.savannah.gnu.org/cgit/libcdio.git/commit/?id=6f2426e8bf4dc5269ccbd9fbfa94340895f8be6e
--- lib/driver/osx.c.orig
jmon12 marked this conversation as resolved.
Show resolved Hide resolved
+++ lib/driver/osx.c
@@ -1232,7 +1232,7 @@
CFRange range;
CFIndex buf_len;

- buf_len = CFDataGetLength( data ) + 1;
+ buf_len = CFDataGetLength( data );
range = CFRangeMake( 0, buf_len );

if( ( p_env->pTOC = (CDTOC *)malloc( buf_len ) ) != NULL ) {