This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
https://mimesniff.spec.whatwg.org/#parsing-a-mime-type [[ While sequence[s] is a whitespace character, continuously execute the following steps: Increment s by 1. ]] The loop does not check if `sequence[s]` exists. An invalid media type like ` ` either raises an out-of-bounds error or reads memory outside of `sequence`. All other loops include the check "If sequence[s] is undefined, return undefined.".
Fixed by PR #2: https://github.com/whatwg/mimesniff/pull/2
https://github.com/whatwg/mimesniff/commit/0be57a924e1f68233eb756a1f5ae3c6253584419