You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/03/30 11:00:36 UTC

[jira] [Commented] (TS-4313) MIMEHdr fails to find header fields

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

ASF GitHub Bot commented on TS-4313:
------------------------------------

GitHub user maskit opened a pull request:

    https://github.com/apache/trafficserver/pull/542

    TS-4313: Fix improper type conversion

    https://issues.apache.org/jira/browse/TS-4313

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maskit/trafficserver ts4313

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/542.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #542
    
----
commit 0ceb502df9c5ea4e5b193a2b18e5886a641bf776
Author: Masakazu Kitajo <ma...@apache.org>
Date:   2016-03-30T08:56:31Z

    TS-4313: Fix improper type conversion

----


> MIMEHdr fails to find header fields
> -----------------------------------
>
>                 Key: TS-4313
>                 URL: https://issues.apache.org/jira/browse/TS-4313
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: MIME
>            Reporter: Masakazu Kitajo
>
> MIMEHdr fails to find a MIMEField occasionally due to improper type conversion.
> It happens if the lower 32 bits of addresses of m_field_slots are the same. The logic below picks up wrong block.
> mime_hdr_field_slotnum(): 
> {code}
> for (fblock = &(mh->m_first_fblock); fblock != NULL; fblock = fblock->m_next) {
>     MIMEField *first = &(fblock->m_field_slots[0]);
>     int block_slot = (int)(field - first); // in units of MIMEField
>     if ((block_slot >= 0) && (block_slot < MIME_FIELD_BLOCK_SLOTS))
> {code}
> The type of block_slot should be intptr_t.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)