gemmellr commented on a change in pull request #197: PROTON-2123 Escape every 
char >127 printed into logs
URL: https://github.com/apache/qpid-proton/pull/197#discussion_r337971720
 
 

 ##########
 File path: c/src/core/util.c
 ##########
 @@ -38,7 +38,7 @@ ssize_t pn_quote_data(char *dst, size_t capacity, const char 
*src, size_t size)
   for (unsigned i = 0; i < size; i++)
   {
     uint8_t c = src[i];
-    if (isprint(c)) {
+    if (c < 128 && isprint(c)) {
 
 Review comment:
   The bit I expect is directly comparable from proton-j uses:
   `if (c > 31 && c < 127 && c != '\\')`
   
   The < 127 and < 128 difference isnt important since DEL (127) isnt 
printable, but I'd note that proton-j also excludes \ (92) from direct 
inclusion since it could clash with the \x prefix used for the alternative 
hex-format output case.

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to