<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:38 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>[SERVER-3991] Indexing past the end of a string in mongo shell</title>
                <link>https://jira.mongodb.org/browse/SERVER-3991</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In the mongo shell&apos;s dbshell.cpp file, the routine isBalanced() tries to figure out if you have finished typing.  It checks to see if parentheses and braces are balanced and whether you might not be finished typing a long quoted string.  The checking for balanced &quot;()&quot; and &quot;{}&quot; uses counters, but for apostrophes (&quot;single quotes&quot;) and double quotes it uses a different method and fast forwards through the string looking for the matching element.  This is a problem, because after this code breaks out of its switch statement there is a bit more code that assumes that the index variable is still in range.  It isn&apos;t; the fast forward algorithm has set the index &apos;i&apos; to code.size() and the expression &apos;code&lt;span class=&quot;error&quot;&gt;&amp;#91;i&amp;#93;&lt;/span&gt;&apos; indexes off the end of the string.&lt;br/&gt;
To see this, run the debug build of the mongo shell in Windows, type the single character &quot;&apos;&quot; and press return.  You get a debug assertion from the runtime.  I&apos;m not quite sure why non-debug builds sail past this error, but the algorithm needs some fine tuning to keep string referencing in bounds.&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="23106">SERVER-3991</key>
            <summary>Indexing past the end of a string in mongo shell</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="tad">Tad Marshall</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Oct 2011 07:27:06 +0000</created>
                <updated>Mon, 11 Jul 2016 18:35:09 +0000</updated>
                            <resolved>Sat, 15 Oct 2011 05:25:49 +0000</resolved>
                                    <version>2.0.0</version>
                                    <fixVersion>2.1.0</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="60635" author="auto" created="Sat, 15 Oct 2011 05:25:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;erh&apos;, u&apos;name&apos;: u&apos;Eliot&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: Merge pull request #116 from tadmarshall/&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3991&quot; title=&quot;Indexing past the end of a string in mongo shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3991&quot;&gt;&lt;del&gt;SERVER-3991&lt;/del&gt;&lt;/a&gt;-reissue&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3991&quot; title=&quot;Indexing past the end of a string in mongo shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3991&quot;&gt;&lt;del&gt;SERVER-3991&lt;/del&gt;&lt;/a&gt; (reissue) &amp;#8211; don&apos;t index past end of string&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/795c7023663347cd78771bed749795e69ecd7213&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/795c7023663347cd78771bed749795e69ecd7213&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="60634" author="auto" created="Sat, 15 Oct 2011 05:25:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;erh&apos;, u&apos;name&apos;: u&apos;Eliot&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: Merge pull request #116 from tadmarshall/&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3991&quot; title=&quot;Indexing past the end of a string in mongo shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3991&quot;&gt;&lt;del&gt;SERVER-3991&lt;/del&gt;&lt;/a&gt;-reissue&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3991&quot; title=&quot;Indexing past the end of a string in mongo shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3991&quot;&gt;&lt;del&gt;SERVER-3991&lt;/del&gt;&lt;/a&gt; (reissue) &amp;#8211; don&apos;t index past end of string&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/795c7023663347cd78771bed749795e69ecd7213&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/795c7023663347cd78771bed749795e69ecd7213&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="60168" author="tad" created="Thu, 13 Oct 2011 01:43:58 +0000"  >&lt;p&gt;I closed pull request 98 and opened &lt;a href=&quot;https://github.com/mongodb/mongo/pull/116&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/116&lt;/a&gt; to replace it.&lt;br/&gt;
Same code, but without the unrelated commits.&lt;/p&gt;</comment>
                            <comment id="58931" author="tad" created="Thu, 6 Oct 2011 20:52:03 +0000"  >&lt;p&gt;Pull request &lt;a href=&quot;https://github.com/mongodb/mongo/pull/98&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/98&lt;/a&gt; addresses this.&lt;/p&gt;</comment>
                            <comment id="58048" author="tad" created="Sat, 1 Oct 2011 07:43:20 +0000"  >&lt;p&gt;The reason that non-debug builds do not show any problem is that the [] operator does not check index bounds and all &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/help_16.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; implementations of std::string store the string null-terminated.  So, this code will always fetch a zero when it indexes off the &quot;end&quot; of the string by one character, and no real harm is done.  Fixing this is mostly worthwhile so that developers testing debug builds don&apos;t see assertion failures that are unrelated to whatever they are working on.  The &quot;Major&quot; priority I assigned to this bug may not be the correct one; customers will not see this bug.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 15 Oct 2011 05:25:47 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 18 weeks, 4 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 18 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrop2n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgeo7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9286</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0s47:</customfieldvalue>

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