Re: Variable-sized lines of text in linked list



Richard Tobin said:

In article <eIKdnV4AV7CsnFXanZ2dnUVZ8rCdnZ2d@xxxxxx>,
Richard Heathfield <rjh@xxxxxxxxxxxxxxx> wrote:

A third problem is that of Denial of Memory attacks, where malicious
users seek (perhaps over a remote connection) to bring the program down
by asking it to deal with ludicrously long lines.

Whether the ability of a function to read a line limited only by the
amount of available memory is a disadvantage or an advantage depends
on the context. Not every program has to be robust again malicious
attacks.

Agreed - which is why ggets should not be dismissed out of hand.
Furthermore, ggets has the advantage of a very simple user interface. This
is not an advantage to be lightly dismissed. Nevertheless, the problems I
mentioned are also significant, and I think Chuck would be wiser to point
them out when he is recommending his function for other people, who might
not have as much experience as he does in deciding when ggets is, and is
not, appropriate in a particular situation.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
.



Relevant Pages

  • Re: Bug analysis
    ... When Chuck came out with a version of ggets that had realloc ... ggets has no realloc trouble. ... Richard Heathfield ...
    (comp.lang.c)
  • Re: slurping in binary data
    ... My news server reports that there are currently 18 messages in this ... One was posted by Chuck Falconer, and 2 by Richard Heathfield, ... My biggest problem with ggets() is the lack of support for re-using buffers that have already been allocated. ... On those rare occasions when I want to do anything remotely similar to ggets, I usually use a single-line buffer which I reallocto a larger size whenever a line comes in which is too big for the current buffer size. ...
    (comp.lang.c)
  • Re: CBF: The Larry Craig of the CLC clique.
    ... On 8 Feb 2008 at 18:26, Richard Heathfield wrote: ... broken ggets routine - who'd even want him in their clique? ... Could you explain what you think is "badly broken" about ggets()? ... CBF's growing alienation in The Clique. ...
    (comp.lang.c)
  • Re: CBF: The Larry Craig of the CLC clique.
    ... broken ggets routine - who'd even want him in their clique? ... Could you explain what you think is "badly broken" about ggets()? ... Richard Heathfield ...
    (comp.lang.c)
  • (part 52) Han from China answers your C questions
    ... Richard Tobin wrote: ... -- Richard Heathfield ... You klutz, Dicky! ... because Sebastian ran circles around little Dicky Heathfield. ...
    (comp.lang.c)