<?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>24890</bug_id>
          
          <creation_ts>2014-03-02 07:44:38 +0000</creation_ts>
          <short_desc>&quot;89 [...] A byte with only the highest bit set&quot;</short_desc>
          <delta_ts>2014-09-20 22:05:21 +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 name="Samuel Bronson">naesten</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>101718</commentid>
    <comment_count>0</comment_count>
    <who name="Samuel Bronson">naesten</who>
    <bug_when>2014-03-02 07:44:38 +0000</bug_when>
    <thetext>http://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern

[[
89 50 4E 47 0D 0A 1A 0A 	FF FF FF FF FF FF FF FF 	None. 	image/png 	A byte with only the highest bit set followed by the string &quot;PNG&quot; followed by CR LF SUB LF, the PNG signature. 
]]

0x89 is *not* a byte with only the highest bit set.  Looking at a random PNG file, it seems that it&apos;s the prose that&apos;s wrong here.

&lt;http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature&gt; may be of interest here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101724</commentid>
    <comment_count>1</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2014-03-02 17:20:02 +0000</bug_when>
    <thetext>Interesting; you are correct.

I definitely borrowed that description from somewhere, but I guess not the PNG spec itself. (I was thinking Wikipedia, but the current version of the article doesn&apos;t exactly match what I wrote here; perhaps its original description was different and has been changed.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111890</commentid>
    <comment_count>2</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2014-09-20 22:05:21 +0000</bug_when>
    <thetext>Fixed this by just referring to it as an &quot;error-checking byte&quot;:

https://github.com/whatwg/mimesniff/commit/6757c672535a77cf86cbfc3b3dbafb6657d4e4ac</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>