<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:12 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>[CDRIVER-8] bson_append_binary produces bogus data</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-8</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The following lines:&lt;/p&gt;

&lt;p&gt;    const int size = 4+1+len;&lt;br/&gt;
    if ( ! bson_append_estart( b , bson_bindata , name , size ) ) return 0;&lt;br/&gt;
    bson_append32(b, &amp;amp;size);&lt;/p&gt;


&lt;p&gt;Should be replaced with:&lt;/p&gt;

&lt;p&gt;    if ( ! bson_append_estart( b , bson_bindata , name , 4+1+len ) ) return 0;&lt;br/&gt;
    bson_append32(b, &amp;amp;len);&lt;/p&gt;


&lt;p&gt;Because the first 32-bit of a binary must only account for the size of the binary data itself.&lt;/p&gt;


&lt;p&gt;BTW, it would be nice to have a way to append an binary array (that is, bindata subtype 2, see &lt;a href=&quot;http://www.mongodb.org/display/DOCS/BSON#BSON-noteondatabinary&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/BSON#BSON-noteondatabinary&lt;/a&gt;) without preencoding the &quot;str&quot; argument of bson_append_binary.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11184">CDRIVER-8</key>
            <summary>bson_append_binary produces bogus data</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="rgl">Rui Lopes</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jan 2010 16:23:48 +0000</created>
                <updated>Wed, 19 Oct 2016 14:14:43 +0000</updated>
                            <resolved>Mon, 25 Jan 2010 14:28:07 +0000</resolved>
                                                    <fixVersion>0.2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="11967" author="rgl" created="Tue, 26 Jan 2010 04:21:15 +0000"  >&lt;p&gt;Because of this note on the spec page:&lt;/p&gt;

&lt;p&gt;    Note that 0x02 is the commonly used &quot;binary&quot; type for carrying general binary data&lt;/p&gt;

&lt;p&gt;I though it was the way to encode an opaque binary array. Is there a preferred way? Maybe with subtype 0x80?&lt;/p&gt;</comment>
                            <comment id="11943" author="redbeard0531" created="Mon, 25 Jan 2010 14:28:07 +0000"  >&lt;p&gt;Why do you need to use subtype 2? bson_iterator_bin_len() should be the same number that would be prefixed to the real data. Just store the array directly.&lt;/p&gt;

&lt;p&gt;If you really need a helper for subtype 2 please open a new case.&lt;/p&gt;</comment>
                            <comment id="11940" author="auto" created="Mon, 25 Jan 2010 14:20:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;RedBeard0531&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;redbeard0531@gmail.com&apos;}
&lt;p&gt;Message: Fix bson_append_binary &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-8&quot; title=&quot;bson_append_binary produces bogus data&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-8&quot;&gt;&lt;del&gt;CDRIVER-8&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo-c-driver/commit/cbb524ba09cd1f2d3690192960e873e6e16f8c77&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo-c-driver/commit/cbb524ba09cd1f2d3690192960e873e6e16f8c77&lt;/a&gt;&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|hrh73b:</customfieldvalue>

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