#233: [BUG] check_named reads past the end of an array
--------------------+-------------------------------------------------------
Reporter: cotto | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: all |
--------------------+-------------------------------------------------------
Comment(by kjs):
I'm not sure if I understand this code enough to commit changes, but
unless I horribly oversee something, isn't this just a matter of adding a
check, along the lines of:
{{{
if (i + 1 < st->dest.n) { /* <== this line added */
INTVAL* int_array;
GETATTR_FixedIntegerArray_int_array(interp,
st->dest.u.op.signature, int_array);
arg_sig = st->dest.sig = int_array[i+1];
/* skip associated opt flag arg as well */
if (arg_sig & PARROT_ARG_OPT_FLAG)
i++;
} /* <== and add closing brace */
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/233#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets