Re: Poll: global buffers

From: George Greer (greerga@circlemud.org)
Date: 07/23/01


On Mon, 23 Jul 2001, Angus Mezick wrote:

>KILL THEM!  I have been using your buffer code for a couple of years now
>and it has saved me untold number of headaches with buffer overruns.

The goal right now is to eliminate the unnecessary buffers, not change the
method of accessing buffers.  The only major global user of string buffers
now is act().  If we had a clean way to multiple-argument it then it would
be changed as well.

>Imagine what would happen if someone sold a couple hundred different
>things to a shop for example, and then typed "list". :)

Crash, which is what I'm also working on it in the buffer removal patch.

        sprintf => snprintf     (w/function for those OS's without it)
        strcpy => strn_cpy      (new CircleMUD function)
        strcat => strncat       (standard)

It's much more difficult than simply rearranging arguments to functions.
The changing of send_to_char() reduced the number of these needing to be
fixed quite a bit.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST