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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to