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

Coverity analysis defect 99830: Unchecked return value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.11
    • Component/s: JavaScript
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      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

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

              Dates

              Created:
              Updated:
              Resolved: