<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:46 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-208] mongo_cursor_get_more has invalid free of cursor-&gt;reply</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-208</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The call &quot;bson_free( cursor-&amp;gt;reply );&quot; is invalid, since mongo_cursor_destroy() destroys the reply as well, and the reply field is used a few lines down.&lt;/p&gt;

&lt;p&gt;Patch:&lt;/p&gt;

&lt;p&gt;diff --git a/src/mongo.c b/src/mongo.c&lt;br/&gt;
index c8df093..2673e7f 100644&lt;br/&gt;
&amp;#8212; a/src/mongo.c&lt;br/&gt;
+++ b/src/mongo.c&lt;br/&gt;
@@ -1269,7 +1269,6 @@ static int mongo_cursor_get_more( mongo_cursor *cursor ) {&lt;br/&gt;
         data = mongo_data_append32( data, &amp;amp;limit );&lt;br/&gt;
         mongo_data_append64( data, &amp;amp;cursor-&amp;gt;reply-&amp;gt;fields.cursorID );&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;bson_free( cursor-&amp;gt;reply );&lt;br/&gt;
         res = mongo_message_send( cursor-&amp;gt;conn, mm );&lt;br/&gt;
         if( res != MONGO_OK ) {&lt;br/&gt;
             mongo_cursor_destroy( cursor );&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="72364">CDRIVER-208</key>
            <summary>mongo_cursor_get_more has invalid free of cursor-&gt;reply</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="gjmurakami">Gary Murakami</assignee>
                                    <reporter username="basic70">Daniel Brahneborg</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 13:38:08 +0000</created>
                <updated>Fri, 9 Aug 2013 19:45:44 +0000</updated>
                            <resolved>Fri, 9 Aug 2013 19:41:09 +0000</resolved>
                                    <version>0.7.1</version>
                                    <fixVersion>0.8.1</fixVersion>
                                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="399700" author="basic70" created="Fri, 9 Aug 2013 19:45:44 +0000"  >&lt;p&gt;It&apos;s kind of irrelevant due to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-209&quot; title=&quot;mongo_cursor_get_more should not call mongo_cursor_destroy&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-209&quot;&gt;&lt;del&gt;CDRIVER-209&lt;/del&gt;&lt;/a&gt; anyway.&lt;/p&gt;

&lt;p&gt;/Daniel&lt;/p&gt;</comment>
                            <comment id="399692" author="auto" created="Fri, 9 Aug 2013 19:40:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;gjmurakami-10gen&apos;, u&apos;name&apos;: u&apos;Gary J. Murakami&apos;, u&apos;email&apos;: u&apos;gary.murakami@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-208&quot; title=&quot;mongo_cursor_get_more has invalid free of cursor-&amp;gt;reply&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-208&quot;&gt;&lt;del&gt;CDRIVER-208&lt;/del&gt;&lt;/a&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;undo&amp;#93;&lt;/span&gt; mongo_cursor_get_more has invalid free of cursor-&amp;gt;reply&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/023cc162d19d8559c88f4f5e513b992a2bb4fcb9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/023cc162d19d8559c88f4f5e513b992a2bb4fcb9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="399691" author="gjmurakami" created="Fri, 9 Aug 2013 19:37:53 +0000"  >&lt;p&gt;On further investigation, the line in question is needed to free previously allocated memory.  Removing it causes a memory leak which is caught/verified by valgrind.&lt;/p&gt;</comment>
                            <comment id="398998" author="auto" created="Thu, 8 Aug 2013 20:49:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;gjmurakami-10gen&apos;, u&apos;name&apos;: u&apos;Gary J. Murakami&apos;, u&apos;email&apos;: u&apos;gary.murakami@10gen.com&apos;}
&lt;p&gt;Message: mongo_cursor_get_more has invalid free of cursor-&amp;gt;reply&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-208&quot; title=&quot;mongo_cursor_get_more has invalid free of cursor-&amp;gt;reply&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-208&quot;&gt;&lt;del&gt;CDRIVER-208&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/6a02a963c3b848fbcf38c358bbaf0877d1deabf5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/6a02a963c3b848fbcf38c358bbaf0877d1deabf5&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|hrnde7:</customfieldvalue>

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