[Top][All Lists]

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

Re: Out of bounds va_arg access in rpl_fcntl

From: Bruno Haible
Subject: Re: Out of bounds va_arg access in rpl_fcntl
Date: Thu, 06 Sep 2018 03:25:53 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> > +            /* These actions take no argument.  */
> > +            result = fcntl (fd, action, NULL);
> > +            break;
> If an action takes no argument, why pass one? Couldn't that run into more 
> static-error complaints and/or technical violations of POSIX?

Indeed, you are right. (I was thinking more in terms of uninitialized
memory accesses, as detected by valgrind. But you are right, static
checkers might complain about the unused argument. gcc already complains
about excess arguments in 'fprintf' invocations. Maybe soon also in
'open' and 'fcntl' invocations...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]