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

SegmentBase getSegmentTimeUs does not perform a bounds check, results in out of bounds error #11014

Closed
1 task
kamaroyl opened this issue Feb 24, 2023 · 3 comments
Assignees
Labels

Comments

@kamaroyl
Copy link

ExoPlayer Version

2.18.3

Devices that reproduce the issue

  • Pixel 6 Pro

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

Provide a dash manifest with an empty segmentTimeline, getSegmentTimeUs attempts to index into segmentTimeline which is empty, resulting in an out of bounds error.

Expected result

Something other than an out of bounds error, perhaps an error or warn that the segmentTimeline is empty.

Actual result

Index out of bounds exception

Media

This was the mpd in question. May violate DASH spec, but a more useful error would be appreciated
DASH_EXAMPLE.zip

Bug Report

@tonihei
Copy link
Collaborator

tonihei commented Feb 27, 2023

The attached MPD fails to parse because it has id="2-sd-video" in one of the AdaptationSet nodes, which is just not allowed because the value is supposed to be an unsigned integer. Even if I hackily ignore this issue in code, I can't see the problem with getSegmentTimeUs you are describing? It would also help to see a stack trace to know how the problem is triggered.

@kamaroyl
Copy link
Author

kamaroyl commented Mar 6, 2023

Ah, apologies, that was an early pass when the packager was putting in the wrong id. I'm able to reproduce by hosting this mpd with a python simple http server and setting the ExoPlayer demo to allow clear text traffic.
ExoPlayerException.zip

@tonihei
Copy link
Collaborator

tonihei commented Mar 7, 2023

Thanks, we'll provide a fix for this.

rohitjoins pushed a commit that referenced this issue Mar 7, 2023
Segment timelines are technically allowed to be empty, but not all places
add the necessary checks.

Issue: #11014
PiperOrigin-RevId: 514722205
rohitjoins pushed a commit to androidx/media that referenced this issue Mar 7, 2023
Segment timelines are technically allowed to be empty, but not all places
add the necessary checks.

Issue: google/ExoPlayer#11014
PiperOrigin-RevId: 514722205
@tonihei tonihei closed this as completed Apr 4, 2023
rohitjoins pushed a commit to androidx/media that referenced this issue Apr 18, 2023
Segment timelines are technically allowed to be empty, but not all places
add the necessary checks.

Issue: google/ExoPlayer#11014
PiperOrigin-RevId: 514722205
(cherry picked from commit 788132b)
rohitjoins pushed a commit that referenced this issue Apr 18, 2023
Segment timelines are technically allowed to be empty, but not all places
add the necessary checks.

Issue: #11014
PiperOrigin-RevId: 514722205
(cherry picked from commit 0113174)
@google google locked and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants