Re: [AD] strcat strcpy etc.. BUG found!

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Robert Ohannessian wrote:

strncpy(buf, "foo", 256);
buf[MIN(strlen("foo"), 256)] = 0;  // add missing 0
                         ^^^
Should be 255.

--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/
The peer will come and reset your connection. RUN WHILE YOU STILL CAN!



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/