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

Coverity analysis defect 99830: Unchecked return value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.3.11
    • JavaScript
    • Fully Compatible
    • ALL
    • Platforms 2016-08-26

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: