You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/01/13 16:27:14 UTC
[GitHub] [trafficserver] bneradt opened a new pull request #8603: LogFilter: fix NULL termination check
bneradt opened a new pull request #8603:
URL: https://github.com/apache/trafficserver/pull/8603
gcc-12 generated the following warning:
proxy/logging/LogFilter.h: In function 'void wipeField(char**, char*, const char*)':
proxy/logging/LogFilter.h:477:35: error: comparing the result of pointer addition '(new_param + 1)' and NULL [-Werror=address]
477 | if (new_param && (new_param + 1)) {
| ~~~~~~~~~~~^~~~
That is indeed a bug. `new_param + 1` will always be non-NULL even if new_param
is NULL because 1 will be added to it. The intention was to check for the
string's null terminator at the offset, which is done via a dereference.
--
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.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #8603: LogFilter: fix NULL termination check
Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #8603:
URL: https://github.com/apache/trafficserver/pull/8603#issuecomment-1015534091
Cherry-picked to v9.2.x
--
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.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt merged pull request #8603: LogFilter: fix NULL termination check
Posted by GitBox <gi...@apache.org>.
bneradt merged pull request #8603:
URL: https://github.com/apache/trafficserver/pull/8603
--
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.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org