• Sonny Rao's avatar
    Add safe vsnprintf and snprintf library functions · 046a37bd
    Sonny Rao authored
    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
    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>
vsprintf.h 2.37 KB