[
https://issues.apache.org/jira/browse/TS-3076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133376#comment-14133376
]
ASF subversion and git services commented on TS-3076:
-----------------------------------------------------
Commit 25407ce75dbffb50b85c224c380952ac79230a76 in trafficserver's branch
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=25407ce ]
TS-3076: fix minor strtok_r errors
> Coverity warning and build error on RHEL6
> -----------------------------------------
>
> Key: TS-3076
> URL: https://issues.apache.org/jira/browse/TS-3076
> Project: Traffic Server
> Issue Type: Bug
> Components: Build
> Reporter: Leif Hedstrom
> Assignee: James Peach
> Fix For: 5.2.0
>
>
> With the strtok_r change, we fail on RHEL6, and Coverity gives the same error
> as well:
> {code}
> *** 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;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)