[SERVER-50005] Coverity analysis defect 115653: Improper use of negative value (remove traffic_reader_main.cpp file) Created: 29/Jul/20  Updated: 29/Oct/23  Resolved: 02/Sep/22

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2022-09-05, Service Arch 2022-09-19
Participants:

 Description   

Improper use of negative value

The negative value may be unexpected by later operations, causing incorrect computations. Negative value can be returned from function is not being checked before being used improperly
/src/mongo/db/traffic_reader_main.cpp:105: NEGATIVE_RETURNS 115653 Function "open(inputFile.c_str(), 0)" returns a negative number.
/src/mongo/db/traffic_reader_main.cpp:105: NEGATIVE_RETURNS 115653 Assigning: "inputFd" = "open(inputFile.c_str(), 0)".



 Comments   
Comment by Githook User [ 02/Sep/22 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'lia394126'}

Message: SERVER-50005 Check for negative fd in traffic_reader_main.cpp
Branch: master
https://github.com/mongodb/mongo/commit/1cdd30aebad8b099b679d0f4bae3d37a255512cb

Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

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