[Prism54-devel] [Bug 100] New: mgt_update_addr(): BUG(): use of
uninitialized variable
bugzilla-daemon at mcgrof.com
bugzilla-daemon at mcgrof.com
Sun Jul 25 21:42:09 UTC 2004
http://prism54.org/cgi-bin/bugzilla/show_bug.cgi?id=100
Summary: mgt_update_addr(): BUG(): use of uninitialized variable
Product: prim54
Version: 1.2
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Device Driver
AssignedTo: prism54-devel at prism54.org
ReportedBy: vda at port.imtp.ilyichevsk.odessa.ua
mgt_update_addr(islpci_private *priv)
{
struct islpci_mgmtframe *res;
int ret;
ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
isl_oid[GEN_OID_MACADDRESS].oid, NULL,
isl_oid[GEN_OID_MACADDRESS].size, &res);
if ((ret == 0) && res && (res->header->operation != PIMFOR_OP_ERROR))
memcpy(priv->ndev->dev_addr, res->data, 6);
else
ret = -EIO;
if (res)
islpci_mgt_release(res);
If res is not modified by islpci_mgt_transaction(), we end up
kfree()ing stack garbage. Obvious fix is to initialize it:
struct islpci_mgmtframe *res = NULL;
I will attach a file showing how BUG() triggered in real life.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Prism54-devel
mailing list