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

Coverity analysis defect 114973: Argument cannot be negative

    • Fully Compatible
    • ALL
    • Service arch 2020-11-30

      Argument cannot be negative

      The negative argument will be interpreted as a very large unsigned value. Negative value used as argument to a function expecting a positive value (for example, size of buffer or allocation)
      /src/mongo/transport/transport_layer_asio.cpp:725: NEGATIVE_RETURNS 114973 Function "socket(2, SOCK_STREAM, 0)" returns a negative number.
      /src/mongo/transport/transport_layer_asio.cpp:725: NEGATIVE_RETURNS 114973 Assigning: "sock" = "socket(2, SOCK_STREAM, 0)".
      /src/mongo/transport/transport_layer_asio.cpp:733: NEGATIVE_RETURNS 114973 "sock" is passed to a parameter that cannot be negative.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: