Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2457

isnan called on atoi - undefined behaviour

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2.0
    • Plugins, Tests
    • None

    Description

      found by clang analyzer

      !isnan(atoi(argv[2])) results in undefined behaviour.

      Fix: use strtol, replacement for atoi with error checking and more input format support. can do octal and hexadecimal input out of the box

      Attachments

        1. patch-protocol-atoi
          1 kB
          Radim Kolar

        Activity

          People

            zwoop Leif Hedstrom
            hsn Radim Kolar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: