[SERVER-25482] Coverity analysis defect 99830: Unchecked return value Created: 08/Aug/16  Updated: 13/Aug/16  Resolved: 08/Aug/16

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2016-08-26
Participants:

 Description   

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

Defect 99830 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/scripting/mozjs/objectwrapper.cpp
Function mongo::mozjs::ObjectWrapper::WriteFieldRecursionFrame::WriteFieldRecursionFrame(JSContext *, JSObject *, mongo::BSONObjBuilder *, mongo::StringData)
/src/mongo/scripting/mozjs/objectwrapper.cpp, line: 555
Calling "JS_GetArrayLength" without checking return value (as is done elsewhere 1 out of 2 times).

            JS_GetArrayLength(cx, thisv, &length);



 Comments   
Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'WaleyChen', u'name': u'Waley Chen', u'email': u'waleycz@gmail.com'}

Message: SERVER-25482 Coverity analysis defect 99830: Unchecked return value
Branch: master
https://github.com/mongodb/mongo/commit/1257f4f5cc2c5a09383c1ddcd3d03bc83809ca18

Generated at Thu Feb 08 04:09:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.