Operational Defect Database

BugZero found this defect 2496 days ago.

MongoDB | 378273

[SERVER-29002] Fix range check in IndexBoundsBuilder::simpleRegex

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.9

Description:

Info

string IndexBoundsBuilder::simpleRegex(....) { .... if (c == 'Q') { .... } else if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '0') || // <= (c == '\0')) { .... } .... } A link to the source code on GitHub PVS-Studio warning: V590 Consider inspecting the 'c >= '0' && c <= '0'' expression. The expression is excessive or contains a misprint. index_bounds_builder.cpp 145 Most likely, the subexpression c >= '0' && c <= '0' has an error, there is no range check of the symbol (this subexpression will be true only in case c == '0'). Judging by other subexpressions, supposedly it should be as follows: c >= '0' && c <= '9'. This issue was originally reported in SERVER-28570.

Top User Comments

xgen-internal-githook commented on Thu, 1 Jun 2017 17:39:03 +0000: Author: {u'name': u'Anne Lim', u'email': u'anne.lim@mongodb.com'} Message: SERVER-29002: Fixed typo in IndexBoundsBuilder::simpleRegex Branch: master https://github.com/mongodb/mongo/commit/6d36b9c90db9fea2c92f90ea7d9775a72b8fa339

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...