public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: nbd@openwrt.org
Cc: linux-wireless@vger.kernel.org, ath5k-devel@venema.h4ckr.net
Subject: re: ath5k: fix tx status reporting issues
Date: Wed, 4 Dec 2013 23:34:51 +0300	[thread overview]
Message-ID: <20131204203451.GA18708@elgon.mountain> (raw)

Hello Felix Fietkau,

The patch 6d7b97b23e11: "ath5k: fix tx status reporting issues" from 
Apr 9, 2011, leads to the following
static checker warning: "drivers/net/wireless/ath/ath5k/base.c:1683 
ath5k_tx_frame_completed()
	 error: buffer overflow 'info->status.rates' 4 <= 4"

drivers/net/wireless/ath/ath5k/base.c
  1675          for (i = 0; i < ts->ts_final_idx; i++) {
  1676                  struct ieee80211_tx_rate *r =
  1677                          &info->status.rates[i];
  1678  
  1679                  r->count = tries[i];
  1680          }
  1681  
  1682          info->status.rates[ts->ts_final_idx].count = ts->ts_final_retry;
  1683          info->status.rates[ts->ts_final_idx + 1].idx = -1;
                                   ^^^^^^^^^^^^^^^^^^^^
It's complaining about this.

  1684  

->ts_final_idx is set in ath5k_hw_proc_4word_tx_status() it comes from
the hardware but in theory it could be a number between 0-3...  I'm not
sure.

regards,
dan carpenter


                 reply	other threads:[~2013-12-04 20:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20131204203451.GA18708@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=ath5k-devel@venema.h4ckr.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@openwrt.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