Comcast / mamba

Mamba is a Swift iOS, tvOS and macOS framework to parse, validate and write HTTP Live Streaming (HLS) data.
Apache License 2.0
180 stars 40 forks source link

Parsing malformed HLS causes crash #82

Open dcoufal opened 4 years ago

dcoufal commented 4 years ago

(Note: Found in 1.x but should also check 2.x when fixing)

Parsing this playlist:

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-TARGETDURATION:3
#EXT-X-KEY:METHOD=AES-128,URI="http://myserver.com",IV=0x000102030aaaaccccccccbbbbb0d0e0f
#EXT-X-MAP:URI=\"http://myserver.com/init.mp4\"
#EXT-X-ENDLIST

Expected Behavior

Parse should succeed

Observed Behavior

Crash in HLSPlaylistStructure.rebuild()

Observed on device(s):

Observed on OS Version(s):