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

Bug#963832: RFS: iotop-c/1.0-1 [ITP] -- iotop-c - simple top-like I/O monitor (implemented in C)




On Jul 8, 2020, at 19:34, Paul Wise <pabs@debian.org> wrote:

On Wed, 2020-07-08 at 20:09 +0300, Boian Bonev wrote:

That is perfectly safe - all recent (last 20 years) glibc versions
allow passing NULL for %s and print (null)... Anyways it is better to
check it explicitly and spare some time for the people who are going to
look into that some day.

In theory iotop-c could be used on non-glibc platforms like Alpine
Linux, but perhaps musl has the same protections?

It does indeed: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n593

I guess there are
other embedded libcs that don't do that though. Either way being
explicit is indeed better.

…but I agree with this. Relying on this behavior is risky and non-portable.

Reply to: