Menu

#190 Buffer Overrun in Pool

open
externals (234)
5
2007-10-22
2007-10-22
No

I have run into what appears to be a limitation with [pool], namely
that it crashes with something around ~780 characters loaded from a
file as values in a key.

I ran into this loading a particularly long list in Memento. I've
attached a patch and a file from which to load to experience the
crash. The file is just a little over the character count needed to
crash it (it seems to be between 780 and 800?). It does not seem to
be a function of the number of elements in the list, but rather the
length of the text in those elements. Shorten a few of the values in
the list and it loads right up.

I'm also pretty sure this is a per-key limitation, as memento's lddir
first loads files into /tmp before copying them into the proper key.
I've used that with a file that was just under the crashing length and
that worked fine (loaded into two keys).

I have tested this on both my PPC Mac and my Intel Mac; maybe others
can check it out too?

(also to clarify, the problem occurs when loading data from a file;
data of any length (that I've tried) makes it into the pool without
issue, and saves without issue)

After leaving it for a while on my G5,
the console started to fill with messages like so:
"pool - format mismatch encountered, skipped line 40074"
with an ever increasing line number.

I left it for about 10 minutes after that began and it showed no sign
of stopping.

(from Thomas Grill:)
It's a typical buffer overrun (caused by a loooong line of data),
making quick-and-dirty code choke.

Discussion

  • Luke Iannini

    Luke Iannini - 2007-10-22

    Bug repro

     
  • Luke Iannini

    Luke Iannini - 2007-10-22

    Logged In: YES
    user_id=1541432
    Originator: YES

    File Added: CoscNearlyAll

     
  • Luke Iannini

    Luke Iannini - 2007-10-22

    Data file for repro

     
  • Luke Iannini

    Luke Iannini - 2007-10-22
    • assigned_to: nobody --> xovo
     

Anonymous
Anonymous

Add attachments
Cancel