You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2014/05/28 02:20:01 UTC
[jira] [Comment Edited] (TS-2618) IOBufferBlock::realloc()'s bounds
check is wrong
[ https://issues.apache.org/jira/browse/TS-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14010540#comment-14010540 ]
James Peach edited comment on TS-2618 at 5/28/14 12:19 AM:
-----------------------------------------------------------
Must have gotten moved/renamed since that was a very confusing name:
{code}
./ink_defs.h:#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
{code}
was (Author: wbardwel):
Must have gotten moved/renamed since that was a very confusing name:
./ink_defs.h:#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
> IOBufferBlock::realloc()'s bounds check is wrong
> ------------------------------------------------
>
> Key: TS-2618
> URL: https://issues.apache.org/jira/browse/TS-2618
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Reporter: William Bardwell
> Assignee: William Bardwell
> Fix For: 5.1.0
>
>
> Presumably this never fires, but:
> {code}
> if (i >= (int64_t) sizeof(ioBufAllocator))
> return;
> {code}
> looks wrong, it looks like i is an index into that array, so it should be
> {code}
> i >= SIZE(ioBufAllocator))
> {code}
> (SIZE() from ink_defs.h)
--
This message was sent by Atlassian JIRA
(v6.2#6252)