linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-zigbee-devel@lists.sourceforge.net, werner@almesberger.net,
	BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v2 bluetooth-next 1/7] 6lowpan: fix udp nullpointer dereferencing
Date: Tue, 17 Dec 2013 12:25:52 +0100	[thread overview]
Message-ID: <20131217112552.GB21663@omega> (raw)
In-Reply-To: <20131217110601.GA21663@omega>

On Tue, Dec 17, 2013 at 12:06:01PM +0100, Alexander Aring wrote:
> On Tue, Dec 17, 2013 at 06:58:12AM -0400, Anderson Lizardo wrote:
> > Hi Alexander,
> > 
> > On Tue, Dec 17, 2013 at 6:32 AM, Alexander Aring <alex.aring@gmail.com> wrote:
> > > Sometimes a nullpointer dereferencing occurs because of using a wrong
> > > pointer arithmetic in udp_uncompression.
> > >
> > > This patch changes "**(hc06_ptr + 3)" to the right one "*(*hc06_ptr +
> > > 3)". Dereferencing like "**(hc06_ptr + 3)" works in a random case only.
> > 
> > And why not use hc06_ptr[0][3] ? IMHO it is more readable and the
> > arithmetic is the same (as far as I know).
> >
> 
> mhh maybe we change it to *hc06_ptr[3] ? Otherwise we have always
> something like [0][#] for access.
> 
meant (*hc06_ptr)[3] here, but I have a better idea to add a function
wich sets some data and increment it automatically. Will send v3 with
that soon.

- Alex

  reply	other threads:[~2013-12-17 11:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 10:32 [PATCH v2 bluetooth-next 0/7] 6lowpan: udp compression/uncompression fix Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 1/7] 6lowpan: fix udp nullpointer dereferencing Alexander Aring
2013-12-17 10:58   ` Anderson Lizardo
2013-12-17 11:06     ` Alexander Aring
2013-12-17 11:25       ` Alexander Aring [this message]
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 2/7] 6lowpan: fix udp compress ordering Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 3/7] 6lowpan: fix udp byte ordering Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 4/7] 6lowpan: add udp warning for elided checksum Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 5/7] 6lowpan: udp use lowpan_fetch_skb function Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 6/7] 6lowpan: udp use subtraction on both conditions Alexander Aring
2013-12-17 10:32 ` [PATCH v2 bluetooth-next 7/7] 6lowpan: cleanup udp compress function Alexander Aring

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=20131217112552.GB21663@omega \
    --to=alex.aring@gmail.com \
    --cc=anderson.lizardo@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-zigbee-devel@lists.sourceforge.net \
    --cc=werner@almesberger.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;
as well as URLs for NNTP newsgroup(s).