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

Coverity warning and build error on RHEL6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.2.0
    • Build
    • None

    Description

      With the strtok_r change, we fail on RHEL6, and Coverity gives the same error as well:

      *** CID 1238635:  Uninitialized pointer read  (UNINIT)
      /example/protocol/TxnSM.c: 951 in parse_request()
      945     }
      946     
      947     /* Parse the server_name and file name from the request. */
      948     int
      949     parse_request(char *request, char *server_name, char *file_name)
      950     {
         CID 1238635:  Uninitialized pointer read  (UNINIT)
         Declaring variable "saveptr" without initializer.
      951       char *saveptr, *temp = strtok_r(request, " ", &saveptr);
      952       if (temp != NULL)
      953         TSstrlcpy(server_name, temp, MAX_SERVER_NAME_LENGTH + 1);
      954       else
      955         return 0;
      

      Attachments

        Activity

          People

            jamespeach James Peach
            zwoop Leif Hedstrom
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: