codythegreat / dss

Dead Simple Slides - A terminal based presentation tool with Vim style keybindings
MIT License
54 stars 3 forks source link

Buffer overflow if presentation has >= 100 slides #35

Closed codythegreat closed 5 years ago

codythegreat commented 5 years ago

I've been doing some testing to see how far DSS can be pushed before it crashes, and currently it can reach 99 slides, but at slide 100 the program will crash with the message:

*** buffer overflow detected ***: ./dss terminated

I find it strange that this happens reliably on presentations with 100 slides, but anything under that is okay. Perhaps there is some kind of hard limit in for struct linked lists?

I've been pondering a solution, and so far my best idea is to have the slides loaded into a "buffer" instead of all at once, and then as the user advances in the presentation the buffer will remove previous slides and add upcoming slides.

amagura commented 5 years ago

This wednesday I'll take a look into this. I imagine it'll show up in Valgrind/gdb.