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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Platforms 2018-03-12
    • 81
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Jonathan Reams
              Reporter:
              Jonathan Reams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: