[CDRIVER-2644] Coverity analysis defect 103522: Dereference null return value Created: 04/May/18  Updated: 28/Oct/23  Resolved: 04/May/18

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

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

Epic Link: Resolve Coverity Warnings
Backwards Compatibility: Fully Compatible

 Description   

Return value of function which returns null is dereferenced without checking

Defect 103522 (STATIC_C)
Checker NULL_RETURNS (subcategory none)
File: /src/mongoc/mongoc-cursor-legacy.c
Function _mongoc_cursor_op_getmore
/src/mongoc/mongoc-cursor-legacy.c, line: 127
Assigning: "server_stream" = null return value from "_mongoc_cursor_fetch_stream".

       server_stream = _mongoc_cursor_fetch_stream (cursor);



 Comments   
Comment by Githook User [ 04/May/18 ]

Author:

{'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}

Message: CDRIVER-2644 check return of fetch_stream
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/dd4f74250389d00e68bbbcb8f6f14b5276315d3a

Generated at Wed Feb 07 21:15:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.