[ 
https://issues.apache.org/jira/browse/TS-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166330#comment-13166330
 ] 

James Peach commented on TS-1042:
---------------------------------

To be honest, it's mostly from habit. However "%*.*s" prints exactly the number 
of bytes whereas "%.*s" prints up to the number of bytes. In this particular 
case we know the number of bytes and we want to print all of them so "%*.*s" 
seems like the right choice. But "%.*s" will fix the bug just as well.
                
> PATCH: correct debug message in FetchSM
> ---------------------------------------
>
>                 Key: TS-1042
>                 URL: https://issues.apache.org/jira/browse/TS-1042
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>            Reporter: James Peach
>            Assignee: Igor Galić
>            Priority: Minor
>             Fix For: 3.1.2
>
>         Attachments: 0004-Fix-FetchSM-debugging-message.patch
>
>
> In the FetchSM module, there is a debug message that can walk off the end of 
> the buffer. This patch corrects that by limiting the printed string to the 
> known length.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to