Skip to contentSkip to conversation

New: found overlapping data buffer

Bug 13438 [email protected] 1 participant 6 messages Jun 3, 2009 – Jun 18, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

http://bugzilla.kernel.org/show_bug.cgi?id=13438

Summary: found overlapping data buffer
Product: SCSI Drivers
Version: 2.5
Kernel Version: 2.6.29.3
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: QLOGIC QLA2XXX
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Hello,

i detected an overlapping data buffer at file "[linux-2.6.29.3/drivers/scsi/qla2xxx/qla_attr.c"
For detection, i used the static code analysis tool cppcheck. It prints the following message:
[linux-2.6.29.3/drivers/scsi/qla2xxx/qla_attr.c:545]: (error) Overlapping data buffer buf

Take a loop at file qla_attr.c at line 545:

        return snprintf(buf, PAGE_SIZE, "%s\n", buf);

Here, buf is used by iteself, this is dangerous!!!!

Best regards

Ettl Martin

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#1 lore raw

[Bug 13438] found overlapping data buffer

http://bugzilla.kernel.org/show_bug.cgi?id=13438

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|                            |PATCH_ALREADY_AVAILABLE
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#2 lore raw

[Bug 13438] found overlapping data buffer

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13438

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#3 lore raw

[Bug 13438] found overlapping data buffer

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13438

Marc Bejarano <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
                   |                            |g

--- Comment #1 from Marc Bejarano <[email protected]> 2009-06-18 04:49:18 ---
patch: http://permalink.gmane.org/gmane.linux.scsi/51819

Status: CLOSED PATCH_ALREADY_AVAILABLE hardly seems fair since the patch was posted after the report, no?

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
#5 lore raw

[Bug 13438] found overlapping data buffer

In reply to [email protected]

http://bugzilla.kernel.org/show_bug.cgi?id=13438

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|PATCH_ALREADY_AVAILABLE |CODE_FIX

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.