IAIK/sweb

Userspace printf() crashes when printing strings >256 chars

Woazboat opened this issue · 2 comments

Userspace printf() uses a fixed stack buffer of 256 chars but doesn't perform any length checking. Causes stack overflows and crashes when trying to print strings that are longer than 256 characters.

Should probably be changed to return an error (even though nobody checks the return value of printf...) instead of silently crashing, or better yet, changed to a better implementation that doesn't have this limitation.

or truncate....

or that