Re: [PATCH] [v3] warn on performance-impacting configs aka. TAINT_PERFORMANCE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Aug 24, 2014 1:41 PM, "Dave Hansen" <dave@xxxxxxxx> wrote:
>
> Let's say there is 1 "buf_left" and I attempt a 100-byte snprintf().
> Won't snprintf() return 1, and buf_written will then equal buf_len?

No. snprintf() returns turn number of bytes it *would* write, if i it wasn't truncated. That's so that people can reallocate a buffer of sufficient size and just try again.

     Linus


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]