Skip to content

fix: CDNFileAssetLoader use-after-free when RiveFile deallocates during download#449

Open
mfazekas wants to merge 1 commit into
rive-app:mainfrom
mfazekas:fix/cdn-loader-use-after-free
Open

fix: CDNFileAssetLoader use-after-free when RiveFile deallocates during download#449
mfazekas wants to merge 1 commit into
rive-app:mainfrom
mfazekas:fix/cdn-loader-use-after-free

Conversation

@mfazekas
Copy link
Copy Markdown
Contributor

@mfazekas mfazekas commented May 13, 2026

Fixes #448, fixes #434

RiveFile.dealloc now cancels in-flight CDN downloads before C++ objects are freed. CDNFileAssetLoader tracks active NSURLSessionTasks and exposes cancelPendingDownloads, fulfilling the existing TODO in the code.

Added CDNFileAssetLoaderTest — tests crash without the fix, pass with it.

@mfazekas mfazekas force-pushed the fix/cdn-loader-use-after-free branch 9 times, most recently from 562fb9c to a5264cf Compare May 13, 2026 07:48
…ng download

RiveFile now cancels in-flight CDN downloads in dealloc before C++ objects
are freed. CDNFileAssetLoader tracks NSURLSessionTasks and exposes
cancelPendingDownloads, called via FallbackFileAssetLoader from RiveFile.dealloc.

Fixes rive-app#448, fixes rive-app#434
@mfazekas mfazekas force-pushed the fix/cdn-loader-use-after-free branch from a5264cf to ea0bd15 Compare May 13, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant