Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25482

Coverity analysis defect 99830: Unchecked return value

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.11
    • Affects Version/s: None
    • Component/s: JavaScript
    • Fully Compatible
    • ALL
    • Platforms 2016-08-26

      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);
      

            Assignee:
            waley.chen Waley Chen
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: