[CDRIVER-2486] Coverity analysis defect 49576: Unchecked return value Created: 01/Feb/18  Updated: 28/Oct/23  Resolved: 12/Feb/18

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Value returned from a function is not checked for errors before being used

Defect 49576 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongoc/mongoc-gridfs-file.c
Function _mongoc_gridfs_file_new_from_bson
/src/mongoc/mongoc-gridfs-file.c, line: 275
Calling "bson_init_static" without checking return value (as is done elsewhere 62 out of 78 times).

             bson_init_static (&file->bson_aliases, buf, buf_len);



 Comments   
Comment by Githook User [ 12/Feb/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2486 check return val in gridfs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/fc4eb63a0581dee88461059a9d61e45a6ed8c56a

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