[SERVER-50231] Coverity analysis defect 115692: Argument cannot be negative Created: 10/Aug/20  Updated: 27/Oct/23  Resolved: 12/Jan/21

Status: Closed
Project: Core Server
Component/s: Catalog
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Dan Larkin-York
Resolution: Works as Designed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Execution Team 2021-01-11, Execution Team 2021-01-25
Participants:

 Description   

Argument cannot be negative

The negative argument will be interpreted as a very large unsigned value. Negative value used as argument to a function expecting a positive value (for example, size of buffer or allocation)
/src/mongo/db/storage/durable_catalog_impl.cpp:987: NEGATIVE_RETURNS 115692 Assigning: "offset" = "md.findIndexOffset(idxName)".
/src/mongo/db/storage/durable_catalog_impl.cpp:989: NEGATIVE_RETURNS 115692 "offset" is passed to a parameter that cannot be negative. [Note: The source code implementation of the function has been overridden by a builtin model.]


Generated at Thu Feb 08 05:22:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.