netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: wang6495@umn.edu
Cc: kjlu@umn.edu, mac@melware.de, isdn@linux-pingi.de,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isdn: eicon: fix a missing-check bug
Date: Fri, 11 May 2018 15:50:46 -0400 (EDT)	[thread overview]
Message-ID: <20180511.155046.122041869811590666.davem@davemloft.net> (raw)
In-Reply-To: <1525548766-13017-1-git-send-email-wang6495@umn.edu>

From: Wenwen Wang <wang6495@umn.edu>
Date: Sat,  5 May 2018 14:32:46 -0500

> To avoid such issues, this patch adds a check after the second copy in the
> function diva_xdi_write(). If the adapter number is not equal to the one
> obtained in the first copy, (-4) will be returned to divas_write(), which
> will then return an error code -EINVAL.

Better fix is to copy the msg header once into an on-stack buffer supplied
by diva_write() to diva_xdi_open_adapter(), which is then passed on to
diva_xdi_write() with an adjusted src pointer and length.

  parent reply	other threads:[~2018-05-11 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05 19:32 [PATCH] isdn: eicon: fix a missing-check bug Wenwen Wang
2018-05-07  1:42 ` YU Bo
2018-05-09  5:30 ` Wenwen Wang
2018-05-09  6:48   ` Tobin C. Harding
2018-05-11 19:50 ` David Miller [this message]
2018-05-18 19:41   ` Wenwen Wang

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=20180511.155046.122041869811590666.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=isdn@linux-pingi.de \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mac@melware.de \
    --cc=netdev@vger.kernel.org \
    --cc=wang6495@umn.edu \
    /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).