lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Mar 2019 16:07:32 +0100
From:   Julius Niedworok <julius.n@....net>
To:     Jeremy Sowden <jeremy@...zel.net>
Cc:     Kalle Valo <kvalo@...eaurora.org>, ga58taw@...um.de,
        linux-wireless@...r.kernel.org, david@...hat.com, nc@....in.tum.de,
        Johannes Berg <johannes@...solutions.net>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2] mac80211: debugfs option to force TX status frames


> On 11.03.2019 15:52, Jeremy Sowden wrote:
>
> It's the value that matters, not the type.  It will only be too big for
> the buffer if the result of casting local->force_tx_status to int is
> less than -9 or greeater than 99.
>
>  scnprintf(buf, size(buf), "%lld\n", (long long)local->force_tx_status)
>
> would also be fine if the value were in range.  Note also that scnprintf
> will not overrun the buffer: it will truncate the string.

Thanks for the clarification :)

> As it happens, arguments to variadic functions are subject to the
> "default argument promotions," so if local->force_tx_status is in fact a
> bool (I can't find the definition), it would be promoted to int and the
> cast is superfluous.

Yes - the cast is superfluous. We still think it might be useful to keep it
there to make the point that the value will be casted. However, if you
prefer to omit the cast, we are happy to take it out.


Thank you,
Julius and Charlie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ