[SERVER-65207] Coverity analysis defect 122015: Argument cannot be negative Created: 03/Apr/22  Updated: 29/Oct/23  Resolved: 11/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-65476 Coverity analysis defect 122072: Macr... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-04-18
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/crypto/fle_crypto.cpp:473: NEGATIVE_RETURNS 122015 Assigning: "rho" = "reader->getDocumentCount()".
/src/mongo/crypto/fle_crypto.cpp:505: NEGATIVE_RETURNS 122015 "rho" is passed to a parameter that cannot be negative.



 Comments   
Comment by Githook User [ 10/Apr/22 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-65207 Coverity analysis defect 122015: Argument cannot be negative
Branch: master
https://github.com/mongodb/mongo/commit/005ef67d2fa7ac29124c85d574892ba2c826abb8

Generated at Thu Feb 08 06:02:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.