public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes
Date: Sun, 28 Sep 2008 01:20:56 +0800	[thread overview]
Message-ID: <200809280120.56880.lindner_marek@yahoo.de> (raw)
In-Reply-To: <200809271831.18672.sven.eckelmann@gmx.de>


Hi,

> I am not sure but I think it could be possible that there is a null pointer
> dereference at batman.c:420
> I assume that it is possible that neigh_node is NULL and orig_node->router
> is also NULL in batman.c:412. Now we dereference neigh_node in batman.c:420
> as third parameter of add_del_route.
> I don't know if the third parameter should be set to 0 if neigh_node is
> NULL or if the "if"-statement is wrong - so i will not send a patch this
> time.

this one is a bit tricky (may be we should add a comment there). In line 386 
we prevent that null pointer dereference:

orig_node->router != neigh_node

If both variables are NULL it would fail here.  :-)


Greetings,
Marek




      reply	other threads:[~2008-09-27 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27 16:31 [B.A.T.M.A.N.] Possible null pointer dereference in batman's update_routes Sven Eckelmann
2008-09-27 17:20 ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200809280120.56880.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@open-mesh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox