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

ASIO's socket_ops::sync_send must never return a negative value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.3
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Platforms 2018-03-12
    • Linked BF Score:
      81

      Description

      socket_ops::sync_send captures information about errors in a std::error_code, and apparently ASIO doesn't check that value before it adds the return value (number of bytes sent) to its count of bytes sent already. If sync_send returns -1 (because of an error), it will end up adding that to its count and then resend a byte which corrupts the message.

        Attachments

          Activity

            People

            Assignee:
            jonathan.reams Jonathan Reams
            Reporter:
            jonathan.reams Jonathan Reams
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: