On Fri, Nov 13, 2015 at 8:32 AM, barret rhoden <[email protected]> wrote:

> > +     for (i = 0; cmds[i]; i++) {
> >> > +             csize = strlen(cmds[i]);
> >> > +             if ((csize + size + 2) > sizeof(msgbuf))
> >> > +                     break;
> >> > +             msgbuf[size] = '|';
> >> > +             memcpy(msgbuf + size + 1, cmds[i], csize);
> >> > +             size += csize + 1;
> >> > +     }
> >> > +     msgbuf[size] = 0;
>
> this has a lot of "+2" and +1.  hope we don't have an off-by-one
> error!  or forget the trailing msgbuf[size] = 0;
>

I'm confused. You say there is a bug in that code? Where is it?

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to