<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12:10 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-1328] mongoc_collection_validate doesn&apos;t always init &quot;reply&quot;</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1328</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The documentation for mongoc_collection_validate says:&lt;/p&gt;

&lt;p&gt;reply &lt;span class=&quot;error&quot;&gt;&amp;#91;an argument&amp;#93;&lt;/span&gt; is always initialized and must be destroyed with bson_destroy().&lt;/p&gt;

&lt;p&gt;(see &lt;a href=&quot;https://api.mongodb.com/c/current/mongoc_collection_validate.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://api.mongodb.com/c/current/mongoc_collection_validate.html&lt;/a&gt;)&lt;/p&gt;


&lt;p&gt;The implementation doesn&apos;t always initialize reply. In particular, if the options passed are invalid, then reply is left alone, which means if a client tries to bson_destroy() it, they might end up accessing uninitialized memory.&lt;/p&gt;

&lt;p&gt;I think this is like a one-line fix, but there might be bugs just like this one all over&lt;/p&gt;</description>
                <environment></environment>
        <key id="293888">CDRIVER-1328</key>
            <summary>mongoc_collection_validate doesn&apos;t always init &quot;reply&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="ian.boros@mongodb.com">Ian Boros</assignee>
                                    <reporter username="ian.boros@mongodb.com">Ian Boros</reporter>
                        <labels>
                            <label>intern2016</label>
                    </labels>
                <created>Tue, 14 Jun 2016 19:48:45 +0000</created>
                <updated>Wed, 10 Aug 2016 22:10:57 +0000</updated>
                            <resolved>Wed, 6 Jul 2016 21:23:20 +0000</resolved>
                                                    <fixVersion>1.4.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1314378" author="xgen-internal-githook" created="Tue, 5 Jul 2016 19:20:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@emptysquare.net&apos;}
&lt;p&gt;Message: Merge pull request #345 from puppyofkosh/&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1328&quot; title=&quot;mongoc_collection_validate doesn&amp;#39;t always init &amp;quot;reply&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1328&quot;&gt;&lt;del&gt;CDRIVER-1328&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1328&quot; title=&quot;mongoc_collection_validate doesn&amp;#39;t always init &amp;quot;reply&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1328&quot;&gt;&lt;del&gt;CDRIVER-1328&lt;/del&gt;&lt;/a&gt; reply is always initialized in mongoc_collection_validate&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/0e2a45372a579d9d50424e814021c21877d0acb3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/0e2a45372a579d9d50424e814021c21877d0acb3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1314377" author="xgen-internal-githook" created="Tue, 5 Jul 2016 19:20:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@emptysquare.net&apos;}
&lt;p&gt;Message: Merge pull request #345 from puppyofkosh/&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1328&quot; title=&quot;mongoc_collection_validate doesn&amp;#39;t always init &amp;quot;reply&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1328&quot;&gt;&lt;del&gt;CDRIVER-1328&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1328&quot; title=&quot;mongoc_collection_validate doesn&amp;#39;t always init &amp;quot;reply&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1328&quot;&gt;&lt;del&gt;CDRIVER-1328&lt;/del&gt;&lt;/a&gt; reply is always initialized in mongoc_collection_validate&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/0e2a45372a579d9d50424e814021c21877d0acb3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/0e2a45372a579d9d50424e814021c21877d0acb3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1314376" author="xgen-internal-githook" created="Tue, 5 Jul 2016 19:20:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;name&apos;: u&apos;ian boros&apos;, u&apos;email&apos;: u&apos;ian.boros@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1328&quot; title=&quot;mongoc_collection_validate doesn&amp;#39;t always init &amp;quot;reply&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1328&quot;&gt;&lt;del&gt;CDRIVER-1328&lt;/del&gt;&lt;/a&gt; reply is always initialized in mongoc_collection_validate&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/356f507bc72424d42474f88dbb0b988b291efb72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/356f507bc72424d42474f88dbb0b988b291efb72&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1295848" author="jesse" created="Wed, 15 Jun 2016 21:08:32 +0000"  >&lt;p&gt;The function can be usefully called with a NULL reply pointer: you could check the function&apos;s return value and the &quot;error&quot; contents and get useful info, even if you don&apos;t retrieve the server&apos;s reply.&lt;/p&gt;

&lt;p&gt;So let&apos;s make &quot;reply&quot; optional. If it isn&apos;t NULL, it&apos;s always initialized. Update code and docs as needed.&lt;/p&gt;</comment>
                            <comment id="1295812" author="ian.boros" created="Wed, 15 Jun 2016 20:44:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I just realized the docs don&apos;t say that reply is optional, but the code also doesn&apos;t make sure that reply is non-null. Which do you think I should change? I&apos;m guessing the docs since it seems like most other functions are okay with reply being NULL, but I just want to check&lt;/p&gt;

&lt;p&gt;EDIT:&lt;br/&gt;
I&apos;m also guessing the code since it seems like there&apos;s not much point to this function if you can&apos;t see the reply&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|hsmhrj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="970">C Driver 2016 sprint 5</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>