Bug 13440

Summary: found overlapping data buffer
Product: Drivers Reporter: Martin Ettl (ettl.martin)
Component: OtherAssignee: drivers_other
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.29.3 Subsystem:
Regression: No Bisected commit-id:

Description Martin Ettl 2009-06-03 15:08:49 UTC
Hello,

i detected an overlapping data buffer at file 
"linux-2.6.29.3/drivers/staging/rt2860/sta/assoc.c"
For detection, i used the static code analysis tool cppcheck. It prints the
following message:
[linux-2.6.29.3/drivers/staging/rt2860/sta/assoc.c:1815]: (error) Overlapping data buffer custom




Take a loop at file assoc.c at line 1815:

  sprintf(custom, "%s%02x", custom, pAd->StaCfg.ReqVarIEs[idx]);



Here, var "custom" is used by iteself, this is dangerous!!!!

Best regards

Ettl Martin