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]
Message-ID: <1497432736.18751.39.camel@perches.com>
Date:   Wed, 14 Jun 2017 02:32:16 -0700
From:   Joe Perches <joe@...ches.com>
To:     Sven Eckelmann <sven@...fation.org>,
        b.a.t.m.a.n@...ts.open-mesh.org
Cc:     Marek Lindner <mareklindner@...mailbox.ch>,
        Simon Wunderlich <sw@...onwunderlich.de>,
        Antonio Quartulli <a@...table.cc>, netdev@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [B.A.T.M.A.N.] Odd use of %14pM in
 net/batman-adv/distributed-arp-table.c

On Wed, 2017-06-14 at 10:23 +0200, Sven Eckelmann wrote:
> On Dienstag, 13. Juni 2017 14:51:41 CEST Joe Perches wrote:
> > An output mac address is 17 bytes
> 
> [...]
> > but in net/batman-adv/distributed-arp-table.c
> 
> [...]
> > %14pM is odd as this should not emit the last byte of the
> > mac address.  So given the example above, it would output
> > 00:11:22:33:44
> 
> [...]
> 
> I completely agree too the "wrong length" part. It is currently not omitting 
> the last byte:

Right, I only looked at vsprintf.c and mistook precision for
field_width.

Do you want to provide a patch to convert it to simple %pM's?

OK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ