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

Coverity analysis defect 155472: Overflowed integer argument

    • Atlas Streams
    • ALL
    • v8.0

      Overflowed integer argument

      The argument will be too small or even negative, likely resulting in unexpected behavior (for example, under-allocation in a memory allocation function). An integer overflow occurs, with the overflowed value used as an argument to a function
      /src/mongo/db/modules/enterprise/src/streams/exec/kafka_connect_auth_callback.cpp:178: INTEGER_OVERFLOW 155472 Called function "recv(socketFile, readBuffer.data() + bytesStored, readBuffer.size() - bytesStored, 0)", and a possible return value may be less than zero.
      /src/mongo/db/modules/enterprise/src/streams/exec/kafka_connect_auth_callback.cpp:178: INTEGER_OVERFLOW 155472 Assigning: "bytesReceived" = "recv(socketFile, readBuffer.data() + bytesStored, readBuffer.size() - bytesStored, 0)".
      /src/mongo/db/modules/enterprise/src/streams/exec/kafka_connect_auth_callback.cpp:197: INTEGER_OVERFLOW 155472 The expression "bytesStored" is considered to have possibly overflowed.
      /src/mongo/db/modules/enterprise/src/streams/exec/kafka_connect_auth_callback.cpp:178: INTEGER_OVERFLOW 155472 The expression "readBuffer.size() - bytesStored" is deemed overflowed because at least one of its arguments has overflowed.
      /src/mongo/db/modules/enterprise/src/streams/exec/kafka_connect_auth_callback.cpp:178: INTEGER_OVERFLOW 155472 "readBuffer.size() - bytesStored", which might have underflowed, is passed to "recv(socketFile, readBuffer.data() + bytesStored, readBuffer.size() - bytesStored, 0)".

            Assignee:
            erik.beebe@mongodb.com Erik Beebe
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: