<?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>23140</bug_id>
          
          <creation_ts>2013-09-03 15:09:29 +0000</creation_ts>
          <short_desc>Further Boundary Checking is Necessary on Slice Calls</short_desc>
          <delta_ts>2013-09-05 17:57:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>File API</component>
          <version>unspecified</version>
          <rep_platform>PC</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>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arun">arun</reporter>
          <assigned_to name="Arun">arun</assigned_to>
          <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92882</commentid>
    <comment_count>0</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2013-09-03 15:09:29 +0000</bug_when>
    <thetext>https://bugzilla.mozilla.org/show_bug.cgi?id=906413 showcases a slice call on a Blob of size 4 of the sort:

slice(0, Number.MAX_SIZE) 

on which on Fx returns a Blob of size 0, but only because of the &apos;long long&apos; threshold being reached.

This bug is to introduce further boundary checks on slice calls, disallowing a slice bigger than the original blob for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92884</commentid>
    <comment_count>1</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2013-09-03 15:35:21 +0000</bug_when>
    <thetext>Additionally, the spec should use [Clamp] on long long arguments to slice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92887</commentid>
    <comment_count>2</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2013-09-03 16:35:23 +0000</bug_when>
    <thetext>Clarification: the spec already disallows end &gt; size and the equivalent for start.  This bug is to add [Clamp] to the IDL to ensure that a call of the sort

slice(0, Number.MAX_SIZE) 

ends up being equivalent to

slice(0, thisBlob.size)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93067</commentid>
    <comment_count>3</comment_count>
    <who name="Arun">arun</who>
    <bug_when>2013-09-05 17:57:12 +0000</bug_when>
    <thetext>http://dev.w3.org/2006/webapi/FileAPI/#blob uses [Clamp] in slice method IDL definition.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>