public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* re: ath5k: fix tx status reporting issues
@ 2013-12-04 20:34 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-12-04 20:34 UTC (permalink / raw)
  To: nbd; +Cc: linux-wireless, ath5k-devel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-12-04 20:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04 20:34 ath5k: fix tx status reporting issues Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox