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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 09 Sep 2014 17:02:52 +0200
From: Antonio Quartulli <antonio@...hcoding.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
The list for a Better Approach To Mobile Ad-hoc
Networking <b.a.t.m.a.n@...ts.open-mesh.org>
CC: netdev@...r.kernel.org
Subject: Re: Fw: [Bug 84061] New: net/batman-adv/gateway_client.c:813: missing
sanity check and dodgy coding ?
forwarding to the batman-adv mailing list and commenting inline.
On 09/09/14 02:30, Stephen Hemminger wrote:
>
>
> Begin forwarded message:
>
> Date: Mon, 8 Sep 2014 00:04:40 -0700
> From: "bugzilla-daemon@...zilla.kernel.org" <bugzilla-daemon@...zilla.kernel.org>
> To: "stephen@...workplumber.org" <stephen@...workplumber.org>
> Subject: [Bug 84061] New: net/batman-adv/gateway_client.c:813: missing sanity check and dodgy coding ?
>
>
> https://bugzilla.kernel.org/show_bug.cgi?id=84061
>
> Bug ID: 84061
> Summary: net/batman-adv/gateway_client.c:813: missing sanity
> check and dodgy coding ?
> Product: Networking
> Version: 2.5
> Kernel Version: 3.17-rc4
> Hardware: All
> OS: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: Other
> Assignee: shemminger@...ux-foundation.org
> Reporter: dcb314@...mail.com
> Regression: No
>
> net/batman-adv/gateway_client.c:813:31: warning: logical not is only applied to
> the left hand side of comparison [-Wlogical-not-parentheses]
>
> gw_node = batadv_gw_node_get(bat_priv, orig_dst_node);
> if (!gw_node->bandwidth_down == 0)
> goto out;
I think this was meant to be:
if (!gw_node || (gw_node->bandwidth_down == 0))
>
> Function batadv_gw_node_get can return NULL, so there's
> a missing sanity check there and maybe the if condition
> can be reworked for clarity.
>
--
Antonio Quartulli
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists