hpcgarage/spatter

snprintf buffer overrun

Closed this issue · 1 comments

If you use a really long index buffer, you can overflow a buffer that is used to pass data to the arg parse functionality.

Copying this data into a buffer was a hack to begin with, and we should see if we can avoid needing to do that copy. The error occurs on parse-args.c:169.

For now, I've increased STRING_SIZE. This seems to work alight as arrays of this size are mostly globals. However it is a waste of space, and not a real solution.

This seems to be similar to #104, so I'm going to add this comment there and close this issue.