Bug 13456 - found overlapping data buffer
Summary: found overlapping data buffer
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 16:00 UTC by Martin Ettl
Modified: 2009-06-05 13:39 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.29.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Martin Ettl 2009-06-04 16:00:02 UTC

    
Comment 1 Martin Ettl 2009-06-04 16:01:20 UTC
Hello,

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

Take a loop at file wpa.c at line 1967:

       sprintf(custom, "%s unicast", custom);

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

Best regards

Ettl Martin
Comment 2 Alan 2009-06-05 13:39:51 UTC
Fixed, thanks

The staging code is pending clean up before proper integration so I don't doubt there are plenty of these.

Note You need to log in before you can comment on or make changes to this bug.