[SERVER-15897] Coverity analysis defect 41886: Overflowed return value Created: 31/Oct/14  Updated: 30/May/23  Resolved: 30/May/23

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Naama Bareket
Resolution: Done Votes: 0
Labels: coverity, neweng, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QI 2023-05-29, QI 2023-06-12
Participants:

 Description   

A new defect has been detected and assigned to greg_10gen in Coverity Connect.
http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=41886
The defect was flagged by checker INTEGER_OVERFLOW in
file /src/mongo/db/field_ref.cpp
function mongo::FieldRef::dottedSubstring(unsigned long, unsigned long) const
and this ticket was created by milkie



 Comments   
Comment by Githook User [ 30/May/23 ]

Author:

{'name': 'Naama Bareket', 'email': 'naama.bareket@mongodb.com', 'username': 'naama-bareket'}

Message: SERVER-15897: Coverity analysis defect 41886: Overflowed return value
Branch: master
https://github.com/mongodb/mongo/commit/6fbfe305e9c6e25f3764c63a5bfe970fa1d78214

Comment by Greg Studer [ 31/Oct/14 ]

If the path is exactly size_t chars long, we'll overflow, but then underflow back a line later.

Generated at Thu Feb 08 03:39:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.