• Benjamin LaHaise's avatar
    [PATCH] vsnprintf returns incorrect length · 60db772a
    Benjamin LaHaise authored
    In conjunction with some of the earlier problems found in /proc code,
    now it turns out that snprintf doesn't work correctly in the kernel...
    Without the following patch, snprintf can return lengths greater than
    the size argument passed.  The net effect is that code using the return
    value from snprintf can still buffer overrun.  This is fixed by not
    updating the pointer in the buffer unless there is actually space.
    60db772a
vsprintf.c 14.5 KB