From: margitsw@t-online.de (Margit Schubert-While)
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, prism54-devel@prism54.org
Subject: [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer
Date: Thu, 15 Jul 2004 15:52:02 +0200 [thread overview]
Message-ID: <200407151552.03289.margitsw@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
2004-07-15 Margit Schubert-While <margitsw@t-online.de>
* oid_mgt.c is calling islpci_mgt_transaction passing the address
of a pointer to the management frame. This is not being
initialized by the caller. The callee only updates this
pointer when successful. When not, boom.
* Being ultracautious again, not only initialize in the caller,
also null out the pointer unconditionally in the callee.
Margit
[-- Attachment #2: mgtframeptr.patch --]
[-- Type: text/x-diff, Size: 1266 bytes --]
diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/islpci_mgt.c linux-2.6.8-03/drivers/net/wireless/prism54/islpci_mgt.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/islpci_mgt.c 2004-06-25 19:48:40.000000000 +0200
+++ linux-2.6.8-03/drivers/net/wireless/prism54/islpci_mgt.c 2004-07-15 15:17:21.000000000 +0200
@@ -458,6 +458,8 @@
int err;
DEFINE_WAIT(wait);
+ *recvframe = NULL;
+
if (down_interruptible(&priv->mgmt_sem))
return -ERESTARTSYS;
diff -Naur linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.8-03/drivers/net/wireless/prism54/oid_mgt.c
--- linux-2.6.8-01/drivers/net/wireless/prism54/oid_mgt.c 2004-07-14 21:55:11.000000000 +0200
+++ linux-2.6.8-03/drivers/net/wireless/prism54/oid_mgt.c 2004-07-15 15:13:53.000000000 +0200
@@ -408,7 +408,7 @@
mgt_set_request(islpci_private *priv, enum oid_num_t n, int extra, void *data)
{
int ret = 0;
- struct islpci_mgmtframe *response;
+ struct islpci_mgmtframe *response = NULL;
int response_op = PIMFOR_OP_ERROR;
int dlen;
void *cache, *_data = data;
@@ -620,7 +620,7 @@
static int
mgt_update_addr(islpci_private *priv)
{
- struct islpci_mgmtframe *res;
+ struct islpci_mgmtframe *res = NULL;
int ret;
ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel
next reply other threads:[~2004-07-15 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-15 13:52 Margit Schubert-While [this message]
2004-07-27 16:26 ` [PATCH Linux-2.6.8-rc1] prism54 Fix reference to uninitialized pointer Jeff Garzik
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=200407151552.03289.margitsw@t-online.de \
--to=margitsw@t-online.de \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=prism54-devel@prism54.org \
/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).