Skip to content
Snippets Groups Projects
Commit 046a37bd authored by Sonny Rao's avatar Sonny Rao Committed by Wolfgang Denk
Browse files

Add safe vsnprintf and snprintf library functions


From: Sonny Rao <sonnyrao@chromium.org>

These functions are useful in U-Boot because they allow a graceful failure
rather than an unpredictable stack overflow when printf() buffers are
exceeded.

Mostly copied from the Linux kernel. I copied vscnprintf and
scnprintf so we can change printf and vprintf to use the safe
implementation but still return the correct values.

(Simon Glass <sjg@chromium.org> modified this commit a little)

Signed-off-by: default avatarSonny Rao <sonnyrao@chromium.org>
parent 9785c905
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment