ezelkow1 edited a comment on issue #4531: Astats plugin - Add null check around strtok_r token usage URL: https://github.com/apache/trafficcontrol/pull/4531#issuecomment-602930463 > > > This is being done in a lot of other places in that file, is there a reason this line in particular is a problem? Its because of the usage of tok1. So all the other usages of strtok_r in there are taking a single pointer for the save value, and then just iterating over strtok_r until it returns null. However in these 2 instances they are re-using the tok1 value from previous strtok_r calls. Strtok_r can return a null value if it doesnt find the string its looking for It shouldnt really be possible here either, due to the while loop checking tok1 for null, but this is mostly to make code checkers happy as this triggered clang analyzer (ran in to this while porting this functionality over to the standard stats_over_http, so in order to get it acceptable for ATS I had to fix the clang issue)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
