<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-816] Invalid buffer size safety check in org.bson.io.Bits.readFully(stream, buf, off, len)</title>
                <link>https://jira.mongodb.org/browse/JAVA-816</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Test: &lt;br/&gt;
call org.bson.io.Bits.readFully(new ByteArrayInputStream(&quot;some sample text&quot;.getBytes()), new byte&lt;span class=&quot;error&quot;&gt;&amp;#91;20&amp;#93;&lt;/span&gt;, 0, 10); &lt;/p&gt;

&lt;p&gt;Expected:&lt;br/&gt;
10 bytes are read.&lt;/p&gt;

&lt;p&gt;Observed:&lt;br/&gt;
java.lang.IllegalArgumentException: Buffer is too small&lt;/p&gt;

&lt;p&gt;The safety check&lt;br/&gt;
    if (b.length - startOffset &amp;gt; length) &lt;/p&gt;
{
        throw new IllegalArgumentException(&quot;Buffer is too small&quot;);
    }
&lt;p&gt;should test for &quot;&amp;lt;&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="73243">JAVA-816</key>
            <summary>Invalid buffer size safety check in org.bson.io.Bits.readFully(stream, buf, off, len)</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chaus_de">Carsten Haustein</reporter>
                        <labels>
                            <label>bson</label>
                            <label>driver</label>
                    </labels>
                <created>Fri, 26 Apr 2013 14:34:40 +0000</created>
                <updated>Thu, 3 Apr 2014 15:21:53 +0000</updated>
                            <resolved>Tue, 25 Jun 2013 17:18:51 +0000</resolved>
                                    <version>2.11.0</version>
                                    <fixVersion>2.12.0</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="367456" author="jeff.yemin" created="Tue, 25 Jun 2013 17:18:30 +0000"  >&lt;p&gt;Fixed in 3.0.x as well: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/4e230513cfae4e840966de9a8b988459ffb3a5dc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/4e230513cfae4e840966de9a8b988459ffb3a5dc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="360120" author="auto" created="Fri, 14 Jun 2013 09:06:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;trnl&apos;, u&apos;name&apos;: u&apos;Uladzimir Mihura&apos;, u&apos;email&apos;: u&apos;trnl.me@gmail.com&apos;}
&lt;p&gt;Message: Added tests for org.bson.io.Bits class. Fix for &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-816&quot; title=&quot;Invalid buffer size safety check in org.bson.io.Bits.readFully(stream, buf, off, len)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-816&quot;&gt;&lt;del&gt;JAVA-816&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/28dc7120f72322ef2641ccffe2ffeddfe9ebaffc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/28dc7120f72322ef2641ccffe2ffeddfe9ebaffc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="322356" author="jeff.yemin" created="Fri, 26 Apr 2013 16:23:26 +0000"  >&lt;p&gt;Thanks for catching this.  Looks like it was only ever tested with startOffset = 0 and length = b.length.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrnia7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>50921</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>