<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29243</bug_id>
          
          <creation_ts>2015-10-26 11:27:25 +0000</creation_ts>
          <short_desc>&quot;While sequence[s] is a whitespace character, co...&quot;</short_desc>
          <delta_ts>2016-02-15 18:49:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>MIME</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>pyfisch</reporter>
          <assigned_to name="Gordon P. Hemsley">gphemsley</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+mimespec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>123948</commentid>
    <comment_count>0</comment_count>
    <who name="">pyfisch</who>
    <bug_when>2015-10-26 11:27:25 +0000</bug_when>
    <thetext>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 &quot;If sequence[s] is undefined, return undefined.&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125058</commentid>
    <comment_count>1</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2016-02-15 18:33:53 +0000</bug_when>
    <thetext>Fixed by PR #2:

https://github.com/whatwg/mimesniff/pull/2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125060</commentid>
    <comment_count>2</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2016-02-15 18:49:26 +0000</bug_when>
    <thetext>https://github.com/whatwg/mimesniff/commit/0be57a924e1f68233eb756a1f5ae3c6253584419</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>